docs(mobile/v4): performance guide + field-notes from building an app - #451
Draft
LukeTowers wants to merge 1 commit into
Draft
docs(mobile/v4): performance guide + field-notes from building an app#451LukeTowers wants to merge 1 commit into
LukeTowers wants to merge 1 commit into
Conversation
The architecture pages document the render/publish/mount pipeline and subtree reuse thoroughly, but there's no developer-facing "why is my tap heavy / what do I do" page. Add digging-deeper/performance.md covering: - what a tap costs (event → render → publish → diff+paint) and that reactivity is per-screen (child components are composition, not update boundaries); - that native diff + paint scale with on-screen node count even when little changed — the practical lever; - levers in order: key lists, flatten the tree, split heavy screens into their own route, use child components for reuse (not isolation), keep polling lean; - how to measure with the built-in BenchmarkComponent (event/diff/paint breakdown), with the real-device caveat.
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.
Draft — opening early so it can grow in small, reviewable commits as I keep building a real NativePHP Mobile v4 app and hit things the docs don't yet cover. Each item below lands as its own commit; happy to split into separate PRs if maintainers prefer.
Included so far
digging-deeper/performance.md— a practical performance guide. The architecture pages (render-publish-mount,subtree-reuse) document the mechanism well, but there's no developer-facing "why does this tap feel heavy / what do I do" page. This one covers:subtree-reuse;BenchmarkComponent(event/diff/paint breakdown), with the real-device caveat (simulator RTT/FPS is unreliable; per-stage breakdown still useful).Planned (separate commits, as I hit/confirm them)
@navigatequoting gotcha in the routing docs —@navigate='/route'(single quotes = short route form, auto-quoted) vs@navigate="…"(double quotes = raw PHP args). The mismatch is a silent compile break.native:watchrequires Watchman (brew install watchman); iOS UI automation (idb) requires the standalone Command Line Tools. Small setup-doc additions.Notes
BenchmarkComponenton the iOS simulator; the page is framed as guidance + how-to-measure rather than hard device benchmarks.🤖 Generated with Claude Code