Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: cp-12.12.0 improve token list rendering #30266

Merged
merged 7 commits into from
Feb 12, 2025

Conversation

Prithpal-Sooriya
Copy link
Contributor

@Prithpal-Sooriya Prithpal-Sooriya commented Feb 12, 2025

Description

The token list is an expensive component that renders many tokens. We found this suite of components to not be optimised, and the selector it relied on to always return new data (causing unnecessary re-renders).

This optimises some controllers and selectors to prevent unnecessary and expensive re-renders.

Open in GitHub Codespaces

Related issues

Fixes: https://github.com/MetaMask/MetaMask-planning/issues/4022

Manual testing steps

  1. Follow instructions in issue
  2. Click "Send" button. Does it load (not take ages as seen in the video)

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@Prithpal-Sooriya Prithpal-Sooriya requested a review from a team as a code owner February 12, 2025 14:37
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbot
Copy link
Collaborator

Builds ready [73fc33b]
Page Load Metrics (1499 ± 40 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint1365167314998641
domContentLoaded1352165914768440
load1367167114998340
domInteractive227635209
backgroundConnect105022147
firstReactRender1498432914
getState4589115
initialActions01000
loadScripts939120110637637
setupStore65012126
uiStartup15302175172716881
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 905 Bytes (0.01%)
  • common: 21 Bytes (0.00%)

@itsyoboieltr itsyoboieltr changed the title feat: improve token list rendering fix: cp-12.12.0 improve token list rendering Feb 12, 2025
@Prithpal-Sooriya Prithpal-Sooriya added this pull request to the merge queue Feb 12, 2025
Merged via the queue into main with commit 832eeaf Feb 12, 2025
76 checks passed
@Prithpal-Sooriya Prithpal-Sooriya deleted the perf/improve-token-list-perf branch February 12, 2025 19:23
@github-actions github-actions bot locked and limited conversation to collaborators Feb 12, 2025
@metamaskbot metamaskbot added the release-12.13.0 Issue or pull request that will be included in release 12.13.0 label Feb 12, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.13.0 Issue or pull request that will be included in release 12.13.0 team-assets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants