Skip to content

Commit b72ded1

Browse files
authored
Merge branch 'main' into add/analytics
2 parents 4e97c4b + 0daac8f commit b72ded1

7 files changed

Lines changed: 560 additions & 26 deletions

File tree

domains/performance/skills/performance/references/mm-tools.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,12 @@ Then read what's emitted — a load log (e.g. `source: 'cache' | 'fresh_fetch'`,
110110
"Prevent regressions going forward"
111111
→ Reassure perf-test in CI + E2E performance gates (mms-performance-testing skill)
112112
113+
"On an RC build" (RC tester, QA, or a flow that's only slow in release)
114+
→ React Native Release Profiler: shake → profile the flow → hand the .cpuprofile to
115+
Claude Code / AI agent of choice to find the hot frames
116+
113117
"Production alert / user report"
114-
→ Sentry (#metamask-mobile-release-monitoring) → Release Profiler on an RC build
118+
→ Sentry (#metamask-mobile-release-monitoring) → Release Profiler on an RC build (as above)
115119
116120
"No tool isolates it"
117121
→ Manual binary search (below)
@@ -182,7 +186,16 @@ EXPO_ATLAS=1 yarn expo export --platform ios && yarn expo-atlas
182186
- Dashboards + `#metamask-mobile-release-monitoring` alerts. `trace()` spans/measurements already flow here. Correlate regressions with release tags.
183187

184188
### React Native Release Profiler (production-like CPU profile)
185-
- RC build (TestFlight/Bitrise) → shake → Profiler → Start → reproduce → Stop → `yarn react-native-release-profiler --local <file.cpuprofile> [--sourcemap-path <maps>]` → open in `chrome://tracing` / SpeedScope / Perfetto. See `docs/readme/release-build-profiler.md`.
189+
Best way to root-cause a slow flow on a real build — and the lowest-effort to read:
190+
191+
1. Grab an **RC build** — a release build; dev builds aren't representative.
192+
2. **Shake** the device → the **Performance Profiler** menu appears.
193+
3. **Start** the profiler, run the slow flow, then **Stop**. The `.cpuprofile` (a `sampling-profiler-trace*.cpuprofile`) saves to **Downloads**.
194+
4. **Analyze it — two ways:**
195+
- **Visualize the flame graph:** symbolicate with `yarn react-native-release-profiler --local <file.cpuprofile> [--sourcemap-path <maps>]`, then open it in **SpeedScope** (speedscope.app) / `chrome://tracing` / Perfetto.
196+
- **Or let AI read it:** hand the `.cpuprofile` to **Claude Code / your AI agent of choice** and ask "why is this slow?" — it parses the sampling profile and names the hot frames / culprit function for you, no flame-graph reading.
197+
198+
See `docs/readme/release-build-profiler.md`.
186199

187200
### Manual binary search (last resort)
188201
1. Android device, go to the slow screen.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
---
22
name: performance
3-
description: Use for any performance question about the MetaMask Mobile React Native app, at any stage. Trigger when: a screen, list, or interaction feels slow, laggy, or janky (account/network switching, scrolling, typing, FPS drops); planning a feature with real-time/websocket data, frequent updates, or large lists and wanting to avoid perf pitfalls before building; reviewing or auditing PRs/code for excessive re-renders, broken selector memoization, Context providers, hook deps, or bundle bloat; making the app faster for power users with many accounts/assets; measuring time-to-interactive, render counts, or FPS and surfacing them in Sentry; or adding render-regression tests so CI catches slowdowns. Covers re-renders, reselect memoization, FlashList, Reanimated, TTI, bundle size, and trace() instrumentation. Not for correctness bugs, styling/spacing, Solidity gas, or the browser extension.
3+
description: Use for any performance question about the MetaMask Mobile React Native app, at any stage. Trigger when: a screen, list, or interaction feels slow, laggy, or janky (account/network switching, scrolling, typing, FPS drops); planning a feature with real-time/websocket data, frequent updates, or large lists and wanting to avoid perf pitfalls before building; reviewing or auditing PRs/code for excessive re-renders, broken selector memoization, Context providers, hook deps, or bundle bloat; making the app faster for power users with many accounts/assets; measuring time-to-interactive, render counts, or FPS and surfacing them in Sentry; analyzing a captured `.cpuprofile` / React Native Release Profiler trace (e.g. a `sampling-profiler-trace*.cpuprofile`) to find why a flow is slow; or adding render-regression tests so CI catches slowdowns. Covers re-renders, reselect memoization, FlashList, Reanimated, TTI, bundle size, trace() instrumentation, and Release Profiler CPU-profile analysis. Not for correctness bugs, styling/spacing, Solidity gas, or the browser extension.
44
---

domains/pr-workflow/skills/pr-codeowners/repos/metamask-mobile.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ parent: pr-codeowners
4040
| ramp | ramp-team |
4141
| predict | predict-team |
4242
| rewards | rewards-team |
43+
| social-ai | social-ai-team |
4344
| design-system-engineers | metamask-design-system-team |
4445
| core-platform | core-platform-team |
4546
| supply-chain | mm-supply-chain-reviewers |

0 commit comments

Comments
 (0)