Skip to content

perf: smoother navigation and fewer full-app recompositions - #764

Closed
Sahank29 wants to merge 4 commits into
Clash-Projects:mainfrom
Sahank29:perf/smooth-navigation
Closed

Sahank29 wants to merge 4 commits into
Clash-Projects:mainfrom
Sahank29:perf/smooth-navigation

Conversation

@Sahank29

Copy link
Copy Markdown
Contributor

Keeps Home alive under pushed screens and stops route and theme changes from recomposing the whole app, so opening and closing pages no longer stutters (also fixes the current compile errors on main).

…ositions

Back from any page rebuilt the whole Feed in one frame because NavHost
disposed Home. Home now stays composed under the NavHost and is only
skipped from layout while covered.

Also:
- theme only rebuilds when a theme setting changes; any unrelated
  DataStore write used to recompose the whole app
- Library no longer flips isLoading on every resume
- page transitions slide instead of fading the full screen
The mini player clearances and the glass backdrop were static
CompositionLocals whose values follow the route and the player sheet.
A static local that changes recomposes its whole subtree, so every
navigation and every player open recomposed every screen, Home rows
included. Make them dynamic so only their readers recompose.

Home is also measured while covered and only skipped at placement, so
coming back is a re-place instead of a full remeasure.
…ayers

The bottom bar was rebuilt every time Home came back; it now stays
composed and is only left unplaced on other screens.

The Feed hero and spotlight artwork used Modifier.alpha, which made the
GPU render each full-width card offscreen on every frame Home was drawn.
Use AsyncImage's paint alpha instead.
The LinkageError retry branch referenced an undefined retryError, and two
companion markers exposed the private QueuedPcm type.
@Sahank29

Copy link
Copy Markdown
Contributor Author

Moved to #765.

@Sahank29 Sahank29 closed this Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant