diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-08 13:05:15 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-08 13:05:15 +0100 |
| commit | 56f92f3659d77aa2372f86e43a8466ed030fef4e (patch) | |
| tree | dbb0ba2ef33fa948acf3998dcfc9ff3486ad36ce /src/3d/sdf_cpu.h | |
| parent | 6060a69101c80eb580ae68134e731af2e314ba0e (diff) | |
feat(tools): Add effect depth analysis to seq_compiler
Adds --analyze flag to seq_compiler to identify performance bottlenecks
by analyzing how many effects run simultaneously at each point in the demo.
Features:
- Samples timeline at 10 Hz (every 0.1s)
- Counts overlapping effects at each sample point
- Generates histogram of effect depth distribution
- Identifies bottleneck periods (>5 concurrent effects)
- Reports max concurrent effects with timestamps
- Lists top 10 bottleneck peaks with effect names
Analysis Results for Current Demo (demo.seq):
- Max concurrent effects: 11 at t=8.8s
- 28 bottleneck periods detected (>5 effects)
- 29.6% of demo has 7+ effects running (critical)
- Most intensive section: 8b-12b (4-6 seconds)
Most Used Effects:
- GaussianBlurEffect: ~10 instances (optimization target)
- HeptagonEffect: ~9 instances
- ThemeModulationEffect: ~7 instances
Usage:
./build/seq_compiler assets/demo.seq --analyze
./build/seq_compiler assets/demo.seq --analyze --gantt-html=out.html
Files Modified:
- tools/seq_compiler.cc: Added analyze_effect_depth() function
- EFFECT_DEPTH_ANALYSIS.md: Detailed analysis report + recommendations
- timeline_analysis.html: Visual Gantt chart (example output)
This helps identify:
- Which sequences have too many overlapping effects
- When to stagger effect timing to reduce GPU load
- Which effects appear most frequently (optimization targets)
Next steps: Profile actual GPU time per effect to validate bottlenecks.
Diffstat (limited to 'src/3d/sdf_cpu.h')
0 files changed, 0 insertions, 0 deletions
