Commit 00b9da4
authored
fix(perf): reduce idle CPU — gate audio sink, static shadow radius, cancel glow animation (#75)
Three idle CPU fixes:
- Gate audioLevelPublisher sink on isRecording; stops 23–43 @published
updates/sec from AVAudioEngine tap firing while not recording
- Make idle outer shadow radius static (2 pt); animated radius forces
per-frame CPU compositing at display refresh rate — only opacity animates
- Wrap glowPhase=false in withAnimation(.linear(duration:0)) to explicitly
cancel the running repeatForever CAAnimation on recording start, preventing
animation accumulation across multiple record/stop cycles1 parent 18f346e commit 00b9da4
1 file changed
Lines changed: 6 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
40 | 39 | | |
41 | 40 | | |
42 | 41 | | |
| |||
282 | 281 | | |
283 | 282 | | |
284 | 283 | | |
285 | | - | |
| 284 | + | |
286 | 285 | | |
287 | 286 | | |
288 | 287 | | |
| |||
297 | 296 | | |
298 | 297 | | |
299 | 298 | | |
300 | | - | |
| 299 | + | |
301 | 300 | | |
302 | 301 | | |
303 | 302 | | |
| |||
0 commit comments