Skip to content

feat(performance): add deferred-render skill - #263

Open
mganchas wants to merge 3 commits into
mainfrom
feat/deferred-render-skill
Open

mganchas wants to merge 3 commits into
mainfrom
feat/deferred-render-skill

Conversation

@mganchas

@mganchas mganchas commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

What

New deferred-render skill under domains/performance/skills/ (installs as mms-deferred-render).

Teaches the opt-in DeferredRender primitive landing in metamask-mobile (MetaMask/metamask-mobile#38039): hold heavy below-the-fold sections out of a screen's opening transition so the screen paints its header/chart/tabs first and the expensive rows mount one frame after the transition.

Content

  • Canonical API table (useScreenTransitionComplete / <DeferredRender>, modes, fallbackMs, screenId, Sentry span) with pointers to the origin PR and in-repo README
  • When to use / when NOT (first paint stays eager, one gate per screen, no nesting)
  • The isPushedScreen integration pattern with the five real reference integrations (MoneyHomeView, PerpsMarketDetailsView + social tabs, TokenDetails, SocialV0View, SocialV1View)
  • Measurement recipe: local-only Reassure harness with eager/held/flush arms, runs: 10, the eager-mock trick for screens without an arm switch, and the Jest caveats (react-native-screens mock, real-timer fallback)
  • Measured reference numbers from the first five adoptions (opening-commit win: 12–81 ms per screen)
  • Workflow + verification checklist (unit tests with findBy*, TestFlight check on a real iPhone)

Validation

yarn audit:skills: 0 errors, and the new skill adds no warnings (95 skills checked).

Marked maturity: experimental until the primitive PR merges.

Teaches the opt-in DeferredRender primitive from metamask-mobile
(PR MetaMask/metamask-mobile#38039): when to hold heavy below-the-fold
sections out of a screen's opening transition, the transition vs paint
mode choice, the one-gate-per-screen rule, and the local Reassure
eager/held/flush measurement recipe with reference numbers from the
first five adoptions.
The DeferredRender primitive now builds on the existing
useScreenTransitionComplete hook instead of a separate useDeferredRender,
so the skill names that hook, explains when to use the bare boolean versus
the gate, and notes the release span only fires with a screenId.

This branch has not been deployed

No deployments
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