This repository was archived by the owner on Nov 16, 2025. It is now read-only.
Commit f9d0b6e
committed
perf: fix CPU overload on startup and clean up old cache data
- Limit concurrent file processing to max 4 tasks (was using all CPU cores)
- Add 1.5s startup delay before heavy processing begins
- Clean up ALL old UserDefaults permanent cache entries (was leaving hundreds)
- Increment cache version to 7 to force migration and cleanup
- Add 0.5s delay between providers during initial load
This prevents the app from becoming unresponsive on startup when processing
hundreds of Claude log files. The old implementation was using all CPU cores
and leaving massive amounts of data in UserDefaults.1 parent ec0659b commit f9d0b6e
File tree
3 files changed
+38
-18
lines changed- VibeMeter/Core/Services
3 files changed
+38
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
348 | | - | |
349 | | - | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
350 | 346 | | |
351 | | - | |
352 | | - | |
| 347 | + | |
| 348 | + | |
353 | 349 | | |
354 | | - | |
| 350 | + | |
355 | 351 | | |
356 | 352 | | |
357 | 353 | | |
358 | | - | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
359 | 358 | | |
360 | 359 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
58 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | | - | |
63 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
64 | 67 | | |
65 | 68 | | |
66 | 69 | | |
67 | 70 | | |
| 71 | + | |
68 | 72 | | |
69 | 73 | | |
70 | 74 | | |
| |||
78 | 82 | | |
79 | 83 | | |
80 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
81 | 94 | | |
82 | 95 | | |
83 | 96 | | |
| |||
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
139 | 142 | | |
140 | 143 | | |
141 | 144 | | |
| |||
146 | 149 | | |
147 | 150 | | |
148 | 151 | | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
149 | 157 | | |
150 | 158 | | |
151 | 159 | | |
| |||
0 commit comments