NavigationStack recomposing problem
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 330
- Forks
- 76
- Avg merge
- 3h 6m
- Merged PRs (30d)
- 1
Description
Hello,
I am currently migrating my app to skip.
With the help of Claude Code I made a lot of progress, but I hit a blocker due to infinite recomposes - which makes my app unbearably laggy.
I am aware of https://github.com/skiptools/skip-ui/pull/441 and https://github.com/skiptools/skip-ui/pull/440 - so it seems no fix is currently available for this.
Environment
- Skip Fuse app; skip-ui 1.56.0, skip-fuse-ui 1.17.0, skip-model 1.7.5, skip 1.9.3
- Physical device: Samsung Galaxy A16, Android 16 (API 36)
Evidence (Layout Inspector, app sitting idle)
- NavDisplay, RenderEntry, and collectPreferences (inside the nav entry) increment every frame - continuously, with no user interaction.
- A bare NavigationStack { Text("x") } is idle (0 recompositions). The loop only appears once the nav entry's content contributes preferences (real screens with a nav bar/normal content).
What I already tried (none fixed it):
- Removed
SideEffect { saveableStateHolder.removeState(true) }from Main.kt — reduced per-frame cost but the loop continued.
So because this is a big roadblocker for me, my questions are:
- Is there any app-side workaround to avoid the per-frame preference recomposition i am not aware of, until a fix lands?
Happy to share more info if needed.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with Main.kt and review the behavior discussed in pull requests 440 and 441. Reproduce the idle bare NavigationStack case, then compare it with navigation content that contributes preferences using the Layout Inspector; done means identifying a confirmed app-side workaround or a clearly isolated cause for the per-frame recompositions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, swift
- Domain
- frontend, mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100