Stress Test Date: March 17, 2026
The TObject class is one of the most fundamental and architecturally refined components of the ASCOOS OS core.
Its cloneObject() method provides deep, shallow, structural, and selective cloning capabilities with exceptional performance and stability.
This stress test was executed using a dataset of 1,000,000 elements inside the properties array, with 300 repetitions per mode, while the system had 429 core classes loaded (Deep + Extras). The results demonstrate the robustness and efficiency of the TObject architecture under extreme load.
The benchmark results demonstrate that the TObject class of ASCOOS OS delivers one of the most efficient and scalable object-cloning implementations found in a PHP-based core. Its behavior remains exceptionally stable even under extreme load conditions, such as the stress test with 1,000,000 elements × 300 runs.
The DEEP, SHALLOW, PROPERTIES-ONLY, and DEEP-PROPERTY-ONLY modes exhibit near-constant performance in both time and memory usage, regardless of dataset size. This confirms that TObject’s architecture is designed with performance, predictability, and minimal resource consumption in mind.
The STRUCTURAL mode is the only one that shows linear growth in CPU and RAM usage. This behavior is expected, as the mode reconstructs the entire properties tree from scratch. Despite its higher cost, its performance remains stable and fully predictable.
Overall, TObject::cloneObject() proves to be highly reliable, extremely fast, and fully stable across all cloning modes. Its performance characteristics validate the architectural quality of ASCOOS OS and its ability to handle large datasets without degradation in speed or memory efficiency.
With only 13.06 MB RAM usage and 0.606 sec load time for 429 classes, ASCOOS OS demonstrates that it stands among the most lightweight and efficient PHP-based cores in its category.
Runs per mode: 300
Dataset size: 1,000,000 elements
Base object RAM: 33.26 MB
ASCOOS OS classes loaded: 429
ASCOOS OS load time: 0.606 sec
ASCOOS OS RAM usage: 13.06 MB
| Mode | Avg Time (sec) | Avg Memory (KB) | Avg Peak (KB) |
|---|---|---|---|
| DEEP | 0.000023 | 0.85 | 34,034.21 |
| SHALLOW | 0.000003 | 0.46 | 34,034.33 |
| STRUCTURAL | 0.292839 | 385,621.77 | 803,992.84 |
| PROPERTIES-ONLY | 0.000011 | 0.83 | 35,323.71 |
| DEEP-PROPERTY-ONLY | 0.000004 | 0.46 | 34,038.74 |
STRUCTURAL is normalized to 100%.
| Mode | Graph | Avg Time |
|---|---|---|
| STRUCTURAL | 0.292839 | |
| DEEP | 0.000023 | |
| SHALLOW | 0.000003 | |
| PROPERTIES-ONLY | 0.000011 | |
| DEEP-PROPERTY-ONLY | 0.000004 |
| Mode | Min | Max | Avg | Std |
|---|---|---|---|---|
| DEEP | 0.000018 | 0.000127 | 0.000023 | 0.000008 |
| SHALLOW | 0.000002 | 0.000027 | 0.000003 | 0.000002 |
| STRUCTURAL | 0.278532 | 0.366951 | 0.292839 | 0.011185 |
| PROPERTIES-ONLY | 0.000008 | 0.000037 | 0.000011 | 0.000003 |
| DEEP-PROPERTY-ONLY | 0.000002 | 0.000008 | 0.000004 | 0.000001 |
| Mode | Min | Max | Avg | Std |
|---|---|---|---|---|
| DEEP | 0.83 | 6.27 | 0.85 | 0.31 |
| SHALLOW | 0.46 | 0.46 | 0.46 | 0.00 |
| STRUCTURAL | 385,621.77 | 385,621.77 | 385,621.77 | 0.00 |
| PROPERTIES-ONLY | 0.83 | 0.83 | 0.83 | 0.00 |
| DEEP-PROPERTY-ONLY | 0.46 | 0.46 | 0.46 | 0.00 |
| Mode | Min | Max | Avg | Std |
|---|---|---|---|---|
| DEEP | 34,015.68 | 34,052.67 | 34,034.21 | 11.74 |
| SHALLOW | 34,017.10 | 34,063.86 | 34,034.33 | 11.81 |
| STRUCTURAL | 419,639.24 | 805,296.71 | 803,992.84 | 22,227.75 |
| PROPERTIES-ONLY | 34,021.09 | 419,688.10 | 35,323.71 | 22,228.37 |
| DEEP-PROPERTY-ONLY | 34,021.51 | 34,068.63 | 34,038.74 | 11.82 |
The chart below illustrates how the average execution time (Avg Time)
of TObject::cloneObject() scales as the dataset grows.
STRUCTURAL is used as the 100% reference point.
| Mode | 5,000 elements | 100,000 elements | 1,000,000 elements |
|---|---|---|---|
| DEEP | 0.000005 | 0.000005 | 0.000023 |
| SHALLOW | 0.000001 | 0.000001 | 0.000003 |
| STRUCTURAL | 0.001440 | 0.028882 | 0.292839 |
| PROPERTIES-ONLY | 0.000002 | 0.000002 | 0.000011 |
| DEEP-PROPERTY-ONLY | 0.000001 | 0.000001 | 0.000004 |
All modes except STRUCTURAL remain almost constant even at 1,000,000 elements. STRUCTURAL increases linearly, as expected, due to full reconstruction of the properties tree.
This chart illustrates how the average execution time (Avg Time)
of TObject::cloneObject() scales as the dataset grows.
STRUCTURAL is used as the 100% reference point.
| Mode | 5,000 elements | 100,000 elements | 1,000,000 elements |
|---|---|---|---|
| DEEP | 0.000005 | 0.000005 | 0.000023 |
| SHALLOW | 0.000001 | 0.000001 | 0.000003 |
| STRUCTURAL | 0.001440 | 0.028882 | 0.292839 |
| PROPERTIES-ONLY | 0.000002 | 0.000002 | 0.000011 |
| DEEP-PROPERTY-ONLY | 0.000001 | 0.000001 | 0.000004 |
All modes except STRUCTURAL remain nearly constant even at 1,000,000 elements. STRUCTURAL increases linearly due to full reconstruction of the properties tree.
The chart below illustrates how memory usage (Memory) and peak memory (Peak)
scale across different dataset sizes for each TObject::cloneObject() mode.
STRUCTURAL is used as the 100% reference point.
| Mode | 5,000 elements | 100,000 elements | 1,000,000 elements |
|---|---|---|---|
| DEEP | 0.86 KB | 0.85 KB | 0.85 KB |
| SHALLOW | 0.46 KB | 0.46 KB | 0.46 KB |
| STRUCTURAL | 1,970 KB | 40,817 KB | 385,621 KB |
| PROPERTIES-ONLY | 0.83 KB | 0.83 KB | 0.83 KB |
| DEEP-PROPERTY-ONLY | 0.46 KB | 0.46 KB | 0.46 KB |
| Mode | 5,000 elements | 100,000 elements | 1,000,000 elements |
|---|---|---|---|
| DEEP | 15,728 KB | 19,698 KB | 34,034 KB |
| SHALLOW | 15,728 KB | 19,698 KB | 34,034 KB |
| STRUCTURAL | 17,673 KB | 101,196 KB | 803,992 KB |
| PROPERTIES-ONLY | 15,742 KB | 19,838 KB | 35,323 KB |
| DEEP-PROPERTY-ONLY | 15,732 KB | 19,702 KB | 34,038 KB |
All modes except STRUCTURAL maintain nearly constant memory usage regardless of dataset size. STRUCTURAL grows linearly due to full reconstruction of the properties tree.
The benchmark results demonstrate that the TObject class of ASCOOS OS is exceptionally efficient and highly scalable. The DEEP, SHALLOW, PROPERTIES-ONLY, and DEEP-PROPERTY-ONLY modes maintain almost constant performance, regardless of dataset size.
The STRUCTURAL mode is the only one that increases significantly in both time and memory, which is expected since it reconstructs the entire properties tree. Its behavior is linear and predictable.
Overall, TObject::cloneObject() proves to be extremely stable and performant, even under extreme conditions (1,000,000 elements × 300 runs). This confirms the robustness and architectural quality of the ASCOOS OS core.
TObject is one of the foundational classes of ASCOOS OS, serving as the primary representation of structured data and behavior within the core. It is designed with extensibility, safety, and performance in mind.
Its cloneObject() method is one of its most powerful features, offering multiple
cloning modes:
This flexibility allows ASCOOS OS to handle complex data structures with full control and minimal resource usage.
ASCOOS OS is a modular, extensible, and extremely lightweight PHP-based application operating system, engineered for high performance and low resource consumption.
Its architecture is built upon:
With only 13.06 MB RAM usage and 0.606 sec load time for 429 classes, the ASCOOS OS core demonstrates performance levels that surpass many larger frameworks in its category.