This series of labs focuses on evaluating performance issues and concurrency in iOS applications. The goal is to investigate UI freezes, data processing times, and persistence overhead.
![Screenshot 2024-12-21 at 08 01 24](https://private-user-images.githubusercontent.com/10231690/397908724-92e0428d-7d49-4291-a3f0-08f5f2c1b452.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0NTQ0NjEsIm5iZiI6MTczOTQ1NDE2MSwicGF0aCI6Ii8xMDIzMTY5MC8zOTc5MDg3MjQtOTJlMDQyOGQtN2Q0OS00MjkxLWEzZjAtMDhmNWYyYzFiNDUyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEzVDEzNDI0MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTBjYTA3YzU0MjY5ZDM0NjYzMmNmOGE3MWM2Nzk0N2E2ZGQzZWIyOTE0YjM3MjA3YjZlNDIzYjZhOGNlNTQyNmUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.QD2Cb5Itx07nHGXLI7o6zVRI4nirl2nDAgNT-WockC4)
The benchmark involves loading 2 million rows of data and rendering them using LazyVGrid
.
The execution time across 10 runs was recorded as follows:
EXECUTION | Duration |
---|---|
1 | 37 seconds : 73 milliseconds |
2 | 37 seconds : 66 milliseconds |
3 | 36 seconds : 83 milliseconds |
4 | 37 seconds : 72 milliseconds |
5 | 36 seconds : 52 milliseconds |
6 | 37 seconds : 31 milliseconds |
7 | 36 seconds : 38 milliseconds |
8 | 36 seconds : 03 milliseconds |
9 | 36 seconds : 46 milliseconds |
10 | 36 seconds : 61 milliseconds |
Execution Time (in seconds) - X-Y Line Graph
Time (seconds)
38 ┤
37 ┤ ⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️
36 ┤ ⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️
35 ┤ ⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️⏱️
21 ┤
20 ┤
└────────────────────────────────────────────
1 2 3 4 5 6 7 8 9 10
Execution Number
- Average Execution Time: Approximately 36.77 seconds.
- Variation: Minimal, indicating consistent execution.
- Optimizations may improve the rendering pipeline or data handling.
Memory usage during 5 executions is summarized below:
EXECUTION | Result RAM | Peak RAM |
---|---|---|
1 | 37.1 MB | 1.24 GB |
2 | 37.2 MB | 1.22 GB |
3 | 37.2 MB | 1.26 GB |
4 | 37.2 MB | 1.22 GB |
5 | 37.1 MB | 1.22 GB |
- Result RAM: Consistent at ~37.1–37.2 MB.
- Peak RAM Usage: High, ranging from 1.22 GB to 1.26 GB.
- Potential areas for optimization include memory allocation during peak data rendering and garbage collection.
- Rest CPU: Below 0%, indicating negligible background activity.
- Execution CPU: Sustained at 98%, reflecting heavy computation during data processing.
- CPU resources are being fully utilized during execution, which may lead to contention with other processes.
- Parallelization strategies could alleviate high CPU usage and improve performance.
-
Execution Time Optimization:
- Implement lazy-loading techniques to optimize row handling.
-
Memory Management:
- Investigate memory spikes during peak usage and implement pooling or caching strategies.
- Analyze potential memory leaks or inefficient allocation patterns.
-
CPU Utilization:
- Explore multithreading or concurrent processing to distribute CPU load.
- Profile the code to identify bottlenecks in data processing and rendering pipelines.
This benchmark serves as a baseline to track performance improvements as optimization techniques are applied.