Live performance targets, monitoring flow, and quality-scaling rules for Catppuccin StarryNight. Mirrors the behaviour of PerformanceAnalyzer, SimplePerformanceCoordinator, EnhancedDeviceTierDetector, and supporting services.
- Frame rate: Aim for 60 FPS. Issue warnings below 50 FPS; degrade quality when frame time exceeds 16.67 ms, and aggressively reduce effects past 33 ms (30 FPS).
- Memory: Baseline ~25 MB; log warnings at ~50 MB and use cleanup strategies beyond ~100 MB via
performanceMonitor.getMemoryUsage(). - CPU: Keep active usage under 15%; reduce effect intensity or disable heavy systems when metrics sustain >25-30%.
- GPU: Target <20% utilization. When
EnhancedDeviceTierDetectordetects limited GPU or WebGL failure,SimplePerformanceCoordinatorswitches to CSS strategies. - Initialization: Core systems should stabilize within ~100 ms after Spicetify readiness; degraded mode handles slower environments (see
docs/GRACEFUL_DEGRADATION_GUIDE.md).
PerformanceAnalyzersingleton tracks subsystem metrics (frame time, FPS, CPU, memory) and publishes events throughunifiedEventBus.PerformanceMonitorrecords rAF timings viastartFrame()/endFrame()and exposes helpers (getFPS,getMemoryUsage).SimplePerformanceCoordinatorconsumes metrics and callssetQualityLevel()on registered systems (visual strategies, UI managers, WebGL integrations).EnhancedDeviceTierDetectorclassifies device tier at startup and when capabilities change, feeding modes such asbattery,balanced,performance,premium.- Optimization strategies (throttle, disable feature, memory cleanup) trigger when thresholds defined in
PerformanceAnalyzer.PERFORMANCE_THRESHOLDSare exceeded.
| Mode | Quality Level | Target FPS | Notes |
|---|---|---|---|
| Battery | 0.4 | 30 | Reduced animations, CSS-only visuals where possible. |
| Balanced | 0.8 | 60 | Default for most devices; mixed CSS/WebGL. |
| Performance | 1.0 | 60 | Full visual stack, high-quality shaders. |
| Premium | 1.0 | 60 | Adds extra effects (e.g. advanced shaders) on flagship hardware. |
Systems (e.g., WebGLGradientStrategy, UnifiedParticleSystem) must implement setQualityLevel() to respect these modes.
- Inspect performance traces via
(window as any).Y3K.performancein debug mode or review console warnings emitted byPerformanceAnalyzer. - When modifying visual systems, test under low tiers by forcing
settings.performance.forceQualityLevelor usingSimplePerformanceCoordinator.setQualityOverride(). - Update particle counts, shader options, and animation strengths to align with the table above.
- Document any new optimization strategies or thresholds in this guide and in
plans/documentation-cleanup.md. - Run
npm run test:performance(see CI) after significant visual or coordinator changes.
- Cross-checked with
src-js/core/performance/PerformanceMonitor.ts,SimplePerformanceCoordinator.ts,EnhancedDeviceTierDetector.ts, andWebGLSystemsIntegration.ts.