MetaMask / MetaMask/metamask-mobile

Check for potential memory consumption between Redux state and Controller states

Open
#14,940 0 comments 0 reactions 0 assignees View on GitHub
area-performance team-mobile-platform
Dominant language
TypeScript
Stars
3k
Forks
1.7k
Avg merge
1d 14h
Merged PRs (30d)
669

Description

### What is this about?

We want to do a spike on whether or not references to controller state in Redux are the same or different WRT state in the controllers. This is meant to identify excess memory usage and our findings should tell us if performance optimizations are needed in this area.

### Scenario

_No response_

### Design

_No response_

### Technical Details

Some things to consider while performing this spike:
- Are top level references being duplicated?
- Is nested data being duplicated?
- What was memory consumption look like when Redux state is removed from the equation? (Pre and post)

### Threat Modeling Framework

_No response_

### Acceptance Criteria

- Findings should be posted in this ticket
- Provide visuals based on findings
- Findings should confirm if performance optimizations are necessary or not

### 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

_No response_

Contributor guide

Open the contributing guide

Research direction

The issue names no files, tests, or entry points. Start by locating the Redux state and controller state, then compare top-level and nested references and measure memory before and after removing Redux state. Done means posting the findings and visuals here, with a conclusion about whether performance optimization is necessary.

Written by the indexing model from the issue text.

Assessment

Tech stack
redux, typescript
Domain
frontend, mobile, performance
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 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.