Repository navigation
Stop 20 Hz playback ticks from re-rendering the full-screen backdrop - #88
Merged
sanylax0 merged 1 commit intoJul 18, 2026
Merged
Conversation
The jetsam RCA's second finding: Player.tick() writes position at 20 Hz and NowPlayingView's body read it (progress ring, scrubber), so the whole page — including AlbumBackdrop's full-screen .blur(radius:60, opaque:true), a ~14 MB offscreen rasterization with an implicit 0.6 s crossfade — re-evaluated twenty times a second while playing. Two changes: - All player.position reads move into tiny leaf views (TrackProgressRing, ScrubberBar, MiniProgressLine); @observable tracks per-body, so the ticks now invalidate only those leaves. - AlbumBackdrop no longer live-blurs: artwork is downscaled once to a ~40 px bitmap (cached per URL) and upscaled by the compositor — visually identical to the radius-60 blur, zero per-frame offscreen rendering; track changes crossfade between two cached bitmaps.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
PR 4 of the jetsam RCA plan — the UI-render branch of the RCA. While playing,
Player.tick()writesposition20×/s;NowPlayingView.body(andMiniPlayerView.bodyin the always-mounted library page) read it, so entire pages re-evaluated at 20 Hz — includingAlbumBackdrop's full-screen.blur(radius: 60, opaque: true), a ~14 MB offscreen rasterization carrying an implicit 0.6 s crossfade animation. Constant invalidation of an offscreen-rendered layer with in-flight animation snapshots is a memory ramp.How
player.positionread moves into tiny dedicated views —TrackProgressRing,ScrubberBar(NowPlayingView),MiniProgressLine(MiniPlayerView).@Observabletracks dependencies per view body, so the 20 Hz ticks now invalidate only those leaves; the backdrop and page chrome never re-evaluate on tick. Visuals unchanged.AlbumBackdropno longer live-blurs. Artwork is downscaled once to a ~40 px bitmap (BackdropRenderer,NSCacheper URL, rendered off-main) and upscaled by the compositor with high interpolation — visually equivalent to a radius-60 gaussian, with zero per-frame offscreen rendering and no 14 MB backing store. Track changes crossfade between two cached bitmaps via an opacity transition; the scrim/vignette overlay is unchanged.Testing
On device: Now Playing should look the same (soft blurred art, crossfade on track change; tweak the 40 px constant in
BackdropRendererif you want it softer/sharper). With Instruments → Core Animation "Color Offscreen-Rendered Yellow", the backdrop should no longer glow yellow, and Allocations should show flat memory during plain playback.🤖 Generated with Claude Code
https://claude.ai/code/session_013TJoWkqg8bzkGdzxWhWjWP
Generated by Claude Code