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: Perf: Prevent MultichainMetaFoxLogo from multiple renders #30286

Merged
merged 4 commits into from
Mar 7, 2025

Conversation

darkwing
Copy link
Contributor

@darkwing darkwing commented Feb 13, 2025

Description

The MultichainMetaFoxLogo component rerenders because we aren't using useCallback for the onClick. This continues to happen even after logged in.

Open in GitHub Codespaces

Related issues

Fixes:

Manual testing steps

  1. Start the extension with ENABLE_WHY_DID_YOU_RENDER=1 yarn start
  2. Don't see rerenders on the MultichainMetaFoxLogo

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.

@darkwing darkwing requested a review from a team as a code owner February 13, 2025 03:49
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 [b805fca]
Page Load Metrics (1663 ± 72 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint14321962166315273
domContentLoaded14151899163914670
load14371959166314972
domInteractive22164453416
backgroundConnect1070302010
firstReactRender1579422512
getState45815168
initialActions01000
loadScripts9681455118012962
setupStore65613136
uiStartup16042296188818589
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 581 Bytes (0.01%)
  • common: 0 Bytes (0.00%)

salimtb
salimtb previously approved these changes Feb 13, 2025
NidhiKJha
NidhiKJha previously approved these changes Feb 17, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [ce494e8]
Page Load Metrics (1470 ± 42 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint1351163014738641
domContentLoaded1335161914558541
load1345162914708842
domInteractive2292452210
backgroundConnect104724136
firstReactRender146426199
getState45010126
initialActions01000
loadScripts948122410868139
setupStore7471094
uiStartup1491187016639646
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 581 Bytes (0.01%)
  • common: 0 Bytes (0.00%)

Copy link
Contributor

@vinnyhoward vinnyhoward left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@darkwing darkwing added this pull request to the merge queue Mar 6, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 6, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [a51e43c]
Page Load Metrics (1541 ± 54 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint48218291495261125
domContentLoaded13491743152110350
load13621838154111354
domInteractive236928105
backgroundConnect898292110
firstReactRender1469292210
getState44511126
initialActions01000
loadScripts980128611268541
setupStore75211105
uiStartup15312231174914972

@metamaskbot
Copy link
Collaborator

Builds ready [53d345d]
Page Load Metrics (2008 ± 105 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint51124901847473227
domContentLoaded169124071967220106
load171724782008219105
domInteractive26186534220
backgroundConnect15101442512
firstReactRender1584352110
getState784272210
initialActions01000
loadScripts12651953150020197
setupStore85518168
uiStartup195929262298262126
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 581 Bytes (0.01%)
  • common: 0 Bytes (0.00%)

@darkwing darkwing added this pull request to the merge queue Mar 7, 2025
Merged via the queue into main with commit 907dbd1 Mar 7, 2025
74 checks passed
@darkwing darkwing deleted the MetafoxLogoPerf branch March 7, 2025 22:13
@github-actions github-actions bot locked and limited conversation to collaborators Mar 7, 2025
@metamaskbot metamaskbot added the release-12.15.0 Issue or pull request that will be included in release 12.15.0 label Mar 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.15.0 Issue or pull request that will be included in release 12.15.0 team-wallet-ux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants