MetaMask / MetaMask/metamask-mobile

Spike: Performance Audit for <team name>

Open
#21,679 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
3k
Forks
1.7k
Avg merge
1d 14h
Merged PRs (30d)
669

Description

### What is this about?

This is a reusable template for any team to create performance audit spikes. It includes:

- **Three audit areas** as requested:
- 🔥 Release-Profiler trace & analysis
- 🌐 API audit (duplicate calls, timing issues)
- 💾 Controller state analysis (ever-growing state)

## 🎯 Deliverables

1. **Time-boxed**: 1-2 days (12-17 hours)
2. **Three reports**: One for each audit area
3. **Actionable output**: Implementation tickets for all findings including preventative measures
4. **Quantitative focus**: Emphasizes measurements (ms, KB, %) not subjective assessments
5. **Performance best practices**:
- Using physical devices for profiling
- API calls
- Watch for duplicate calls
- Watch for calls when they are not needed
- State cleanup strategies
- Caching opportunities

### Scenario

_No response_

### Design

_No response_

### Technical Details

_No response_

### Threat Modeling Framework

_No response_

### Acceptance Criteria

_No response_

### Stakeholder review needed before the work gets merged

- [ ] Engineering (needed in most cases)
- [ ] Design
- [ ] Product
- [ ] QA (automation tests are required to pass before merging PRs but not all changes are covered by automation tests - please review if QA is needed beyond automation tests)
- [ ] Security
- [ ] Legal
- [ ] Marketing
- [ ] Management (please specify)
- [ ] Other (please specify)

### References

Both files reference your existing documentation:
- `docs/readme/release-build-profiler.md` - Profiling guide
- `docs/readme/performance.md` - Optimization patterns
- [Nightly RC with builds release profiler enabled](https://consensys.slack.com/archives/C093JQSEPJL)
- [API tracing audit training](https://www.loom.com/share/87f745c6635843e6b332886cb175407b?sid=6e936653-09f9-44a5-9eff-d9e0b6d2cbf4)
- Tools: API tracing, SpeedScope, Redux DevTools

Contributor guide

Open the contributing guide

Research direction

Start by reading docs/readme/release-build-profiler.md and docs/readme/performance.md, then review the API tracing, SpeedScope, and Redux DevTools guidance. The audit should produce three quantitative reports covering release profiling, API calls, and controller state, plus actionable implementation tickets for each finding.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, redux, typescript
Domain
mobile, observability, performance
Issue type
Refactor
Difficulty
4/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.