Skip to content

App Performance: Enhancement - remove styled-components and optimize rendering performance - #2241

Open
gabrielbazan7 wants to merge 30 commits into
bitpay:developfrom
gabrielbazan7:ref/performance
Open

gabrielbazan7 wants to merge 30 commits into
bitpay:developfrom
gabrielbazan7:ref/performance

Conversation

@gabrielbazan7

@gabrielbazan7 gabrielbazan7 commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Performance diagnostics (PERF_DEBUG)

All performance instrumentation is gated behind a single constant in src/utils/performanceDebug.ts, off by default. Set it to true and reload to enable it; logs go to the Metro console.

Prefix What it measures
[PERF-NAV] screen transitions — transitionDeltaMs is the animation alone, stateDeltaMs also covers the work before it starts (forward navigations only)
[PERF-SCREEN] a screen's mount timeline: commit → layout → first frame → second frame
[PERF-REACT] React render/commit per subtree — compare actualMs against baseMs to spot missing memoization
[PERF-REDUX] dispatch and reducer durations
[PERF-PERSIST] redux-persist writes to MMKV

[PERF-NAV], [PERF-REDUX] and [PERF-PERSIST] work as soon as the flag is on. [PERF-SCREEN] needs useScreenRenderPerformance(name) wired to the screen's onLayout, and [PERF-REACT] needs the subtree wrapped in <PerformanceProfiler id="..." onRender={logReactProfiler}> — both are no-ops while the flag is off, so they're safe to leave in place.

Keep the flag false on merge: performanceLog is a plain console.log, and performanceDebug.spec.ts asserts the default so an accidental commit fails CI.

gabrielbazan7 and others added 24 commits September 14, 2026 20:38
- ClearEncryptPassword: parse ScreenGutter ('12px') to a number
- InfoImageContainer: expand the margin shorthand instead of parseFloat
- CtaContainer overrides: reset paddingHorizontal that CSS shorthand used to clear
- OptionsSheet: restore option text spacing and chevron alignment
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.

2 participants