-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or requestperformancePerformance optimization and profilingPerformance optimization and profiling
Description
Context
LayeredBufferVisualizerruns a continuous rAF loop (~30fps) and draws a full spectrogram usingputImageDataevery 100ms.drawSpectrogramToCanvastouches every pixel (width * height), then uploads to canvas each time.
Evidence
- File:
src/components/LayeredBufferVisualizer.tsx(loop +putImageData+ per-frame waveform draw) - Frame jank present in trace (max interval 80.1ms).
Hypothesis
- DebugPanel open increases paint time and GC due to large ImageData uploads and per-frame waveform sampling.
Actions
- Only redraw spectrogram when new features are available; skip
putImageDataif unchanged. - Reduce resolution (downsample width/height) or render to OffscreenCanvas +
ImageBitmaptransfer. - Pause the loop when not recording or when panel is not visible.
Acceptance
- With DebugPanel open, no additional long tasks >50ms vs panel closed.
- CPU time for DebugPanel rendering reduced by at least 30%.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestperformancePerformance optimization and profilingPerformance optimization and profiling