MetaMask / MetaMask/metamask-mobile

App Performance Start-Up: Transaction Element Optimizations

Open
#10,610 0 comments 0 reactions 0 assignees View on GitHub
area-performance external-contributor INVALID-ISSUE-TEMPLATE team-confirmations team-tiger-deprecated Transactions
Dominant language
TypeScript
Stars
3k
Forks
1.7k
Avg merge
1d 14h
Merged PRs (30d)
669

Description

**What is this about?**

As a user, I want the MetaMask app to start up as fast as possible. During the application start-up it was identified that aspects of the `TransactionElement/utils.js` is adding about 3 seconds to the app startup on Android devices.

**Technical Details**

- `import decodeTransaction` in `TransactionNotification`, `TransactionElement`, and `TransactionDetails`
- Commenting out the entire `TransactionElement/utils.js` resolves the slow down
- @Tomás Santos performed a quick test on only removing this, which seemed to reduce start up time by ~3 seconds

**Acceptance Criteria**

- Root cause the impact to start up time and shift the activity to after the user has logged into the application.
- Track app start time improvement

**Stakeholder review needed before the work gets merged**

- [X] 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**

- https://www.notion.so/metamask-consensys/Performance-Game-Plan-83ec0133962a4b7682a64c66e65d566c?pvs=4#1eab5b670b244c4da2e27277a3472f1d
- Platform team is available for clarification or support

Contributor guide

Open the contributing guide

Research direction

Start with TransactionElement/utils.js and its decodeTransaction imports in TransactionNotification, TransactionElement, and TransactionDetails. Profile Android startup to confirm the reported delay, then determine how the activity can move until after login; record the startup improvement and verify the acceptance criteria.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, javascript, react-native
Domain
mobile, performance
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.