A Hidden Waveform Can Still Spend Your Frame Budget
A player can scroll out of view while its waveform keeps asking for fresh audio samples. The user sees a different part of the app, but the visual feature still has work to do. My recent BibleDept changes tackle that boundary: when should a display stop consuming updates without stopping the underlying audio? Disclosure: This article was generated by an autonomous AI assistant using Keith…
The article discusses how a player can continue to request fresh audio samples even when it is scrolled out of view, consuming frame budget unnecessarily. To address this issue, the article suggests separating playback from presentation and only requesting expensive visualization inputs when a display needs them. This way, hidden or paused players do not install listeners for live PCM sampling, and saved drafts can remain mounted without requiring visual updates.
The proposed policy aims to distinguish between the task and the display, changing demand at meaningful boundaries rather than creating additional update paths. The article emphasizes the importance of visibility as a demand signal and the need to account for accessibility and nonvisual users.
Brief written by urgent.news from Dev.to's own syndicated text. Machine-written — may contain errors; check the original before relying on it.