Skip to content

fix: Stabilize withRouterHooks props by memoizing params/location references#39311

Merged
DDDDDanica merged 10 commits intomainfrom
copilot/memoize-with-router-hooks
Jan 30, 2026
Merged

fix: Stabilize withRouterHooks props by memoizing params/location references#39311
DDDDDanica merged 10 commits intomainfrom
copilot/memoize-with-router-hooks

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 16, 2026

Description

This PR fixes a critical performance issue where useParams() and useLocation() hooks return new object references on every render, even when values are identical. The withRouterHooks HOC was passing these unstable references directly to wrapped components, breaking React.memo optimization and triggering cascade re-renders across ~40 components per cycle, with multiple cascade cycles (5+) per user action.

What is the reason for the change?
The unstable object references from router hooks were causing unnecessary re-renders throughout the application, significantly slowing down all user actions.

What is the improvement/solution?
Added memoization to stabilize params and location prop references:

  • For params: Track keys and values as separate string primitives to detect actual content changes
  • For location: Track individual properties (pathname, search, hash, state) to detect route changes
  • Both use useMemo to return the same object reference when content hasn't changed

Changelog

CHANGELOG entry: Fixed critical performance issue slowing down all user actions by stabilizing props references used in routes

Related issues

Part of Break Global Re-render Cascade epic

Manual testing steps

  1. Use the extension and navigate between different routes
  2. Perform user actions that trigger route changes (e.g., sending transactions, switching accounts)
  3. With performance profiling or React DevTools, observe that wrapped components using withRouterHooks no longer re-render unnecessarily when route values haven't changed
  4. Verify all existing functionality works as expected (navigation, routing, etc.)

Screenshots/Recordings

N/A - This is a performance optimization with no visible UI changes. The improvement is observable through React DevTools Profiler showing reduced re-render counts.

Pre-merge author checklist

Original prompt

This section details on the original issue you should resolve

<issue_title>[P0] Memoize withRouterHooks HOC (params/location stability)</issue_title>
<issue_description>## Summary

Stabilize object references from useParams() and useLocation() in withRouterHooks HOC. This is a P0 critical fix required to break the global re-render cascade.

Parent Epic: #6669 — Break Global Re-render Cascade

Problem

withRouterHooks HOC passes useParams() and useLocation() results directly to wrapped components. These hooks return new object references on every render even when the values are identical, breaking React.memo and causing cascade re-renders.

WDYR Analysis shows:

  • props.params flagged as "different objects that are equal by value"
  • This triggers on ~40 components per cascade cycle
  • Multiple cascade cycles per user action (5+)

Current Code

// ui/helpers/higher-order-components/with-router/with-router.component.js
const ComponentWithRouterHooks = (props) => {
  const hookNavigate = useNavigate();
  const hookLocation = useLocation();
  const hookParams = useParams();

  return (
    <WrappedComponent
      navigate={props.navigate ?? hookNavigate}
      location={props.location ?? hookLocation}
      params={props.params ?? hookParams}  // New object every render!
    />
  );
};

Solution

Memoize router props to maintain stable references:

import { useMemo } from 'react';

const ComponentWithRouterHooks = (props) => {
  const hookNavigate = useNavigate();
  const hookLocation = useLocation();
  const hookParams = useParams();

  // Stabilize params object
  const stableParams = useMemo(
    () => props.params ?? hookParams,
    [props.params, JSON.stringify(hookParams)],
  );

  // Stabilize location object
  const stableLocation = useMemo(
    () => props.location ?? hookLocation,
    [
      props.location,
      hookLocation.pathname,
      hookLocation.search,
      hookLocation.hash,
      hookLocation.state,
    ],
  );

  return (
    <WrappedComponent
      {...props}
      navigate={props.navigate ?? hookNavigate}
      location={stableLocation}
      params={stableParams}
    />
  );
};

Files

  • ui/helpers/higher-order-components/with-router/with-router.component.js

Acceptance Criteria

  • params and location props maintain stable references when values unchanged
  • Unit tests verify memoization works correctly
  • No regression in routing behavior
  • WDYR no longer flags "different objects that are equal by value" for params/location

Estimated Effort

2 hours

Labels

perf, HOC, P0, team-extension-platform</issue_description>

Comments on the Issue (you are @copilot in this section)

  • Fixes MetaMask/MetaMask-planning#6671

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.


Note

Medium Risk
Touches a widely used routing HOC and changes how location updates propagate (ignoring location.key), which could affect components that implicitly relied on key-based updates. Logic is straightforward and covered by new unit tests, but regressions would be broadly visible in navigation-related UI.

Overview
withRouterHooks now memoizes router-derived props so wrapped components receive referentially stable params and location values when their meaningful contents haven’t changed.

This introduces a new useShallowEqualityCheck hook for shallow-reference stabilization (used for params) and adds useLocationStable to keep location stable while intentionally ignoring location.key changes. Tests were expanded to assert memoization behavior, precedence of explicitly passed params/location props, and to cover edge cases like comma-containing param values and same-path navigations where only location.key changes.

Written by Cursor Bugbot for commit 7fd9991. This will update automatically on new commits. Configure here.

Copilot AI changed the title [WIP] Memoize useParams and useLocation in withRouterHooks Memoize withRouterHooks to stabilize params/location references Jan 16, 2026
Copilot AI requested a review from MajorLift January 16, 2026 05:06
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 16, 2026

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.

@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Jan 16, 2026

Builds ready [c1d5bd2]
UI Startup Metrics (1311 ± 118 ms)
PlatformBuildTypePageMetricTest Title (ms)Persona (ms)Mean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--13111019162811813991514
load--1092872141211011641280
domContentLoaded--1085868140111011571274
domInteractive--2816155232488
firstPaint--155631172119192285
backgroundConnect--22019926613225249
firstReactRender--17103251929
getState--371985134068
initialActions--1011113
loadScripts--87366211911099531067
setupStore--1363561529
numNetworkReqs--171177161166
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--19461640259120320312474
load--1061907170713610861390
domContentLoaded--1048901169913610781370
domInteractive--36181452734122
firstPaint--1777557486224355
backgroundConnect--26020472894242505
firstReactRender--22165462436
getState--18213977866194231
initialActions--109112
loadScripts--82869114671338431157
setupStore--17114661830
numNetworkReqs--59361342465129
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--795659102079836969
load--64357786570680807
domContentLoaded--63857486069675799
domInteractive--241696172177
firstPaint--1016032951114204
backgroundConnect--275103284296
firstReactRender--15114251625
getState--311480133855
initialActions--104112
loadScripts--63557185768673794
setupStore--1254571430
numNetworkReqs--171181171171
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--13861024215227315391985
load--70160396586713930
domContentLoaded--69159595786699922
domInteractive--36181452835117
firstPaint--1376438162174256
backgroundConnect--56757912219509
firstReactRender--23183642630
getState--16612973983165192
initialActions--102011
loadScripts--68759395485696919
setupStore--1864891842
numNetworkReqs--1003530952134211
19--------
FirefoxBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--14661113214918515801803
load--1165953190215212511423
domContentLoaded--1165953190215212511422
domInteractive--69332003792139
firstPaint--------
backgroundConnect--722028461103206
firstReactRender--13112731319
getState--136132131128
initialActions--103122
loadScripts--1117939187713111831388
setupStore--153182201345
numNetworkReqs--20987201374
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--25801875592573525114721
load--1264997280533912742000
domContentLoaded--1263996280533912731999
domInteractive--1193246896120406
firstPaint--------
backgroundConnect--135231176194116306
firstReactRender--2615114152465
getState--30362858230444823
initialActions--217123
loadScripts--1209980254325712361700
setupStore--1297750170120579
numNetworkReqs--60301623287119
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--16541305256321517712063
load--13691120190713014311608
domContentLoaded--13691120190713014301608
domInteractive--892925144128153
firstPaint--------
backgroundConnect--64202514676168
firstReactRender--16129391622
getState--188139221576
initialActions--102122
loadScripts--13301101177211413871537
setupStore--214252371585
numNetworkReqs--19984191374
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--29092057682789632924659
load--16841122556774618222886
domContentLoaded--16841122556674618222886
domInteractive--113311000135101395
firstPaint--------
backgroundConnect--179271325256179996
firstReactRender--2517173162831
getState--28878874242469819
initialActions--214123
loadScripts--15891107553869016742722
setupStore--1078820151105485
numNetworkReqs--60281663976159
19--------
📊 Page Load Benchmark Results

Current Commit: c1d5bd2 | Date: 1/16/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.03s (±67ms) 🟡 | historical mean value: 1.04s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 722ms (±65ms) 🟢 | historical mean value: 724ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 75ms (±10ms) 🟢 | historical mean value: 76ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.03s 67ms 999ms 1.31s 1.24s 1.31s
domContentLoaded 722ms 65ms 691ms 988ms 926ms 988ms
firstPaint 75ms 10ms 60ms 152ms 84ms 152ms
firstContentfulPaint 75ms 10ms 60ms 152ms 84ms 152ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 731 Bytes (0.01%)
  • common: 20 Bytes (0%)

@MajorLift MajorLift force-pushed the copilot/memoize-with-router-hooks branch from c1d5bd2 to 0b2debf Compare January 16, 2026 22:04
@MajorLift MajorLift changed the title Memoize withRouterHooks to stabilize params/location references fix: Stabilize withRouterHooks props by memoizing params/location references Jan 16, 2026
@MajorLift MajorLift removed their request for review January 16, 2026 22:21
@MajorLift MajorLift requested a review from DDDDDanica January 16, 2026 22:21
@MajorLift

This comment was marked as resolved.

This comment was marked as resolved.

Copilot AI requested a review from MajorLift January 16, 2026 22:33
@MajorLift MajorLift removed their request for review January 16, 2026 22:33
@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Jan 16, 2026
@MajorLift MajorLift marked this pull request as ready for review January 16, 2026 22:44
@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Jan 20, 2026

Builds ready [1b9cbaf]
UI Startup Metrics (1350 ± 111 ms)
PlatformBuildTypePageMetricTest Title (ms)Persona (ms)Mean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--13501079169111114071536
load--1127899146610911901330
domContentLoaded--1121894145810911841324
domInteractive--2816132222389
firstPaint--1826813372381951039
backgroundConnect--23020931013236250
firstReactRender--17105371931
getState--4218110174973
initialActions--104113
loadScripts--89768012301089681092
setupStore--1363351527
numNetworkReqs--171174161163
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--19181603264020020242366
load--1046912140511510691330
domContentLoaded--1033908139811710521323
domInteractive--35171332535105
firstPaint--1666739067226280
backgroundConnect--283214708123258620
firstReactRender--22175852429
getState--17113729529183226
initialActions--107112
loadScripts--81268711711148241107
setupStore--17114461732
numNetworkReqs--59372322860124
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--76562995766796894
load--61455876456624750
domContentLoaded--60955475855620746
domInteractive--231484171980
firstPaint--1135563377140241
backgroundConnect--4151414185116
firstReactRender--15103541525
getState--2914141213257
initialActions--103111
loadScripts--60655275054618741
setupStore--1062941219
numNetworkReqs--181186181173
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--14321043203927216192001
load--724623112591737974
domContentLoaded--714617111491721968
domInteractive--38181613135140
firstPaint--1386635972185289
backgroundConnect--84761016126535
firstReactRender--24183332630
getState--16213477865164191
initialActions--105112
loadScripts--711615110590719958
setupStore--1875381940
numNetworkReqs--993822346134210
19--------
FirefoxBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--14301096194717715521761
load--1152943163613212311386
domContentLoaded--1151942163613212301386
domInteractive--783124548112167
firstPaint--------
backgroundConnect--57212094755172
firstReactRender--14104361422
getState--136211211129
initialActions--103122
loadScripts--1115928148011011951327
setupStore--144154171341
numNetworkReqs--19978181369
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--25751857526553726354301
load--13141098284932912802059
domContentLoaded--13141098284932912792058
domInteractive--140401043140127470
firstPaint--------
backgroundConnect--122261054144120257
firstReactRender--2617111132666
getState--26770861215365796
initialActions--209123
loadScripts--12731072282631212421760
setupStore--16512870212157666
numNetworkReqs--5229120237797
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--16311302229719217622040
load--13631111168612814381612
domContentLoaded--13631111168612814371612
domInteractive--882823446128158
firstPaint--------
backgroundConnect--68203345479190
firstReactRender--14112221519
getState--2682845015136
initialActions--103122
loadScripts--13191094165711313841570
setupStore--2252674014136
numNetworkReqs--18974151360
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--29732062878999936264688
load--16621185733077416093016
domContentLoaded--16621181733077516083015
domInteractive--155306027596102306
firstPaint--------
backgroundConnect--2212513163142101174
firstReactRender--2516126142745
getState--293811054248447827
initialActions--213123
loadScripts--15721169730571915062686
setupStore--1141182317890595
numNetworkReqs--5030103197084
19--------
📊 Page Load Benchmark Results

Current Commit: 1b9cbaf | Date: 1/20/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±41ms) 🟡 | historical mean value: 1.05s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 729ms (±39ms) 🟢 | historical mean value: 732ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 77ms (±10ms) 🟢 | historical mean value: 81ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 41ms 1.02s 1.34s 1.08s 1.34s
domContentLoaded 729ms 39ms 705ms 1.01s 742ms 1.01s
firstPaint 77ms 10ms 60ms 156ms 88ms 156ms
firstContentfulPaint 77ms 10ms 60ms 156ms 88ms 156ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 128.88 KiB (2.57%)
  • ui: 3.99 KiB (0.05%)
  • common: 233.97 KiB (2.59%)

@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Jan 20, 2026

Builds ready [05d31e2]
UI Startup Metrics (1303 ± 100 ms)
PlatformBuildTypePageMetricTest Title (ms)Persona (ms)Mean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--13031035155310013721464
load--1091877135510011571249
domContentLoaded--1085872134610011521246
domInteractive--2716132222388
firstPaint--145641214125180313
backgroundConnect--22019826512224246
firstReactRender--15103041725
getState--3718117144059
initialActions--103112
loadScripts--8716671150989381023
setupStore--1262231419
numNetworkReqs--171177161164
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--19291634249018820622357
load--1039915154811510511305
domContentLoaded--1025909149611310411300
domInteractive--34171222434105
firstPaint--198731504187227279
backgroundConnect--285212641124257619
firstReactRender--23165672338
getState--18013773463191241
initialActions--102112
loadScripts--80669012841128161084
setupStore--1895281937
numNetworkReqs--59361912961140
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--795669105672834910
load--64558390866664775
domContentLoaded--64057990265659767
domInteractive--2615110212187
firstPaint--1066024746129207
backgroundConnect--2951242936101
firstReactRender--15113141724
getState--3315138183961
initialActions--103112
loadScripts--63757789364657760
setupStore--1364181338
numNetworkReqs--171171161166
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--1342920204928115271923
load--679597105785685893
domContentLoaded--671589105285675889
domInteractive--35171643231130
firstPaint--1246529160151253
backgroundConnect--80763617717556
firstReactRender--22163232426
getState--14712724418153185
initialActions--102111
loadScripts--668587104584673882
setupStore--1664471637
numNetworkReqs--923625049136208
19--------
FirefoxBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--14531106235322515751857
load--1159946206817012431431
domContentLoaded--1158941206817012421431
domInteractive--8731989111108171
firstPaint--------
backgroundConnect--55172894765158
firstReactRender--15104461435
getState--197567571338
initialActions--103122
loadScripts--1124933203015811941331
setupStore--14597131438
numNetworkReqs--19985181474
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--25701751733883125154673
load--13141033596860111812684
domContentLoaded--13131033596860111812684
domInteractive--171354227447123354
firstPaint--------
backgroundConnect--107251182151108201
firstReactRender--23158292431
getState--29965933235444815
initialActions--204123
loadScripts--12701018594957611592491
setupStore--1245735174109643
numNetworkReqs--502797217785
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--16321304214117917671998
load--13751163180712814501607
domContentLoaded--13751163180712814501606
domInteractive--883023044130157
firstPaint--------
backgroundConnect--65222134691156
firstReactRender--15122731520
getState--198240311536
initialActions--103122
loadScripts--13331149178611113891552
setupStore--2242484113122
numNetworkReqs--19976181374
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--304419878088105238494848
load--16751176676375315973049
domContentLoaded--16741175676275315973049
domInteractive--973051183101260
firstPaint--------
backgroundConnect--2162713293311541210
firstReactRender--241683102640
getState--314671752301468846
initialActions--207123
loadScripts--15661154672766615702838
setupStore--1228107918099588
numNetworkReqs--5029102196788
19--------
📊 Page Load Benchmark Results

Current Commit: 05d31e2 | Date: 1/20/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.03s (±37ms) 🟡 | historical mean value: 1.05s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 714ms (±35ms) 🟢 | historical mean value: 732ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 75ms (±13ms) 🟢 | historical mean value: 81ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.03s 37ms 1.00s 1.31s 1.06s 1.31s
domContentLoaded 714ms 35ms 694ms 982ms 739ms 982ms
firstPaint 75ms 13ms 56ms 196ms 84ms 196ms
firstContentfulPaint 75ms 13ms 56ms 196ms 84ms 196ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 128.88 KiB (2.57%)
  • ui: 5.08 KiB (0.06%)
  • common: 233.97 KiB (2.59%)

@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Jan 21, 2026

Builds ready [713ee5b]
UI Startup Metrics (1279 ± 108 ms)
PlatformBuildTypePageMetricTest Title (ms)Persona (ms)Mean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--12791020157610813581460
load--1073861129310411351261
domContentLoaded--1067857128710411201255
domInteractive--261694202284
firstPaint--156641052140179290
backgroundConnect--21619825611219242
firstReactRender--15102741722
getState--351993114051
initialActions--104113
loadScripts--85966110931039121032
setupStore--1363751421
numNetworkReqs--171177171167
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--324916828331162344406325
load--1115903170014012231349
domContentLoaded--1098897167913812021343
domInteractive--36182353334111
firstPaint--192771314192228429
backgroundConnect--9482084093100717922967
firstReactRender--21163542330
getState--3251321918308389919
initialActions--102011
loadScripts--87569514551319811113
setupStore--207191202440
numNetworkReqs--924721734100174
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--84268312701028941048
load--67258397781729833
domContentLoaded--66758097280725829
domInteractive--2515100192283
firstPaint--1035937553129226
backgroundConnect--225107242887
firstReactRender--16113451828
getState--3615144244376
initialActions--104112
loadScripts--66457897080719819
setupStore--1474381633
numNetworkReqs--171170161165
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--1412938277031215202086
load--743593100976782904
domContentLoaded--731587100377764897
domInteractive--42191762941123
firstPaint--1687677099229331
backgroundConnect--41859810020297
firstReactRender--24194442632
getState--16113342933167202
initialActions--103111
loadScripts--72958599575762889
setupStore--20653102044
numNetworkReqs--95412654097221
19--------
FirefoxBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--14521149195816915541762
load--1158977149912112251401
domContentLoaded--1158976149912212251401
domInteractive--823126354103220
firstPaint--------
backgroundConnect--61202334770170
firstReactRender--15104771438
getState--1153251223
initialActions--103122
loadScripts--1120962139410211831321
setupStore--213550571358
numNetworkReqs--19976181371
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--26481933741777027353759
load--12731059236222813301901
domContentLoaded--12731059236222813301900
domInteractive--168541347159176447
firstPaint--------
backgroundConnect--294381492292443908
firstReactRender--23157772530
getState--242611307211305710
initialActions--204123
loadScripts--12161030233518712711547
setupStore--11523705116123385
numNetworkReqs--77351522684130
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--16381344211218017582000
load--13811136186113414511673
domContentLoaded--13801136186113414511673
domInteractive--912923044128156
firstPaint--------
backgroundConnect--62202154565160
firstReactRender--15112721619
getState--189248301547
initialActions--103122
loadScripts--13431120175411714111556
setupStore--196172281573
numNetworkReqs--19982181371
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--28812174624953530203880
load--15561219478342215912485
domContentLoaded--15561218478342215912485
domInteractive--184521368209214371
firstPaint--------
backgroundConnect--3794218143675891069
firstReactRender--23155152530
getState--22380859175240675
initialActions--203123
loadScripts--15141188471841615292454
setupStore--11615660132138467
numNetworkReqs--75301712784144
19--------
📊 Page Load Benchmark Results

Current Commit: 713ee5b | Date: 1/21/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±42ms) 🟡 | historical mean value: 1.04s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 727ms (±38ms) 🟢 | historical mean value: 725ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 77ms (±15ms) 🟢 | historical mean value: 78ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 42ms 1.02s 1.34s 1.10s 1.34s
domContentLoaded 727ms 38ms 705ms 1.00s 754ms 1.00s
firstPaint 77ms 15ms 60ms 208ms 88ms 208ms
firstContentfulPaint 77ms 15ms 60ms 208ms 88ms 208ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 1.34 KiB (0.02%)
  • common: 20 Bytes (0%)

@MajorLift MajorLift requested review from a team and HowardBraham January 21, 2026 20:16
@github-project-automation github-project-automation bot moved this to Needs dev review in PR review queue Jan 23, 2026
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Jan 28, 2026

Builds ready [7fd9991]
UI Startup Metrics (1307 ± 115 ms)
PlatformBuildTypePageMetricTest Title (ms)Persona (ms)Mean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--13071071155011513901494
load--1117901137311211811305
domContentLoaded--1110894136511111771298
domInteractive--2616108192277
firstPaint--166671178168185299
backgroundConnect--23221029014235265
firstReactRender--18103852028
initialActions--106112
loadScripts--89468811581129661086
setupStore--1364271431
numNetworkReqs--221582171575
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--319316529812176045198135
load--1203979199016213191529
domContentLoaded--1180971187315312941458
domInteractive--39182993535102
firstPaint--248751888268253539
backgroundConnect--948287379697314883218
firstReactRender--25175472842
initialActions--109112
loadScripts--935742159114610291230
setupStore--1565181932
numNetworkReqs--1025025241109216
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--8226651045928831020
load--68358694675736798
domContentLoaded--67858394175730794
domInteractive--251587162273
firstPaint--1056261868117196
backgroundConnect--41181633239125
firstReactRender--14103241523
initialActions--106112
loadScripts--67558193974728792
setupStore--1064151116
numNetworkReqs--221582171572
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--1369938231226015641764
load--73061610741057391004
domContentLoaded--7186111066105728993
domInteractive--3618137223796
firstPaint--1516347083204309
backgroundConnect--18011560191166480
firstReactRender--22162932529
initialActions--102011
loadScripts--7156091059104726984
setupStore--1244151418
numNetworkReqs--1214931151138241
19--------
FirefoxBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--14041118197119415141819
load--1130942170915411951416
domContentLoaded--1129942170915411941416
domInteractive--70302544590138
firstPaint--------
backgroundConnect--65252224888159
firstReactRender--1293631216
initialActions--103112
loadScripts--1091925161512711331364
setupStore--17519932975
numNetworkReqs--231187181877
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--27801813637563529574015
load--12971099239022313661773
domContentLoaded--12961099238922313661772
domInteractive--170521277182175378
firstPaint--------
backgroundConnect--52011319673997661377
firstReactRender--21153242227
initialActions--203123
loadScripts--12451035228420212931589
setupStore--1098614118139444
numNetworkReqs--944230047100209
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--16441347224517517571975
load--14011175167411414701622
domContentLoaded--14001175167411414701621
domInteractive--862920942122149
firstPaint--------
backgroundConnect--752721750119194
firstReactRender--14112321419
initialActions--103012
loadScripts--1361115915939214291530
setupStore--184225351175
numNetworkReqs--221293171863
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--29202140484553431844083
load--15281271297628816291937
domContentLoaded--15271271297628816291937
domInteractive--152471244142177323
firstPaint--------
backgroundConnect--51110520463707141054
firstReactRender--22155862331
initialActions--206123
loadScripts--14861233296026516011906
setupStore--13015764165132563
numNetworkReqs--91392214395211
19--------
📊 Page Load Benchmark Results

Current Commit: 7fd9991 | Date: 1/28/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.06s (±64ms) 🟡 | historical mean value: 1.04s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 741ms (±62ms) 🟢 | historical mean value: 722ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 79ms (±10ms) 🟢 | historical mean value: 77ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.06s 64ms 1.01s 1.34s 1.28s 1.34s
domContentLoaded 741ms 62ms 701ms 1.02s 946ms 1.02s
firstPaint 79ms 10ms 64ms 168ms 88ms 168ms
firstContentfulPaint 79ms 10ms 64ms 168ms 88ms 168ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 1.34 KiB (0.02%)
  • common: 20 Bytes (0%)

@github-project-automation github-project-automation bot moved this from Needs dev review to Review finalised - Ready to be merged in PR review queue Jan 30, 2026
@DDDDDanica DDDDDanica added this pull request to the merge queue Jan 30, 2026
Merged via the queue into main with commit 22d7bf1 Jan 30, 2026
341 of 343 checks passed
@DDDDDanica DDDDDanica deleted the copilot/memoize-with-router-hooks branch January 30, 2026 15:37
@github-actions github-actions bot locked and limited conversation to collaborators Jan 30, 2026
@metamaskbot metamaskbot added the release-13.18.0 Issue or pull request that will be included in release 13.18.0 label Jan 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

external-contributor INVALID-PR-TEMPLATE PR's body doesn't match template release-13.18.0 Issue or pull request that will be included in release 13.18.0 size-M

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants