Skip to content

Comments

fix: Prevent lengthy spinner on load when selected network is slow#35516

Merged
mcmire merged 3 commits intomainfrom
dont-await-net-version-request
Sep 10, 2025
Merged

fix: Prevent lengthy spinner on load when selected network is slow#35516
mcmire merged 3 commits intomainfrom
dont-await-net-version-request

Conversation

@mcmire
Copy link
Contributor

@mcmire mcmire commented Aug 29, 2025

Description

When starting, the UI creates a StreamProvider that wraps the MetaMask provider and can be used to make internal and external requests through the core JSON-RPC pipeline via the background connection. This StreamProvider must be initialized in order for the UI to complete the start sequence and in order for users to see anything on screen.

When the StreamProvider initializes, it will make a background request for metamask_getProviderState to populate its internal state. As a part of its logic, this RPC method will retrieve the network version from the dapp-selected RPC endpoint. However, this creates a problem. If the RPC endpoint is slow, this request won't resolve in a timely manner, and the user will continue to see a spinner.

To address this, this commit changes the metamask_getProviderState handler to accept a parameter, isInitializingStreamProvider. It expects that StreamProvider will call the RPC method and pass true for this parameter (this happens in @metamask/provider 22.1.1). When this happens, the request for net_version will not be made and the initial network version will be set to "loading". This allows the UI to complete its start sequence regardless of how slow the network is. Once the UI is loaded, it will update the memStore state, and metamask_getProviderState will be requested again, but this time, isInitializingStreamProvider will be set to false. This means the network version will be properly retrieved and propagated to all of the places that need it.

Open in GitHub Codespaces

Changelog

CHANGELOG entry: Prevent lengthy spinner on load when selected network is slow to respond

Related issues

Related to #34214

Manual testing steps

  • Check out the main branch.
  • Find getProviderNetworkState in metamask-controller.js and add the following:
          let networkVersion = this.deprecatedNetworkVersions[networkClientId];
          if (networkVersion === undefined && completedOnboarding) {
    +       await new Promise((resolve) => {
    +         setTimeout(() => resolve(), 15000);
    +       })
            try {
              const result = await networkClient.provider.request({
                method: 'net_version',
              });
              networkVersion = convertNetworkId(result);
            } catch (error) {
              console.error(error);
              networkVersion = null;
            }
      
            this.deprecatedNetworkVersions[networkClientId] = networkVersion;
          }
  • Run yarn start.
  • Open the popup. You should see a spinner for 15 seconds before the home screen is shown.
  • Now check out this branch.
  • Reapply the same patch as above.
  • Wait for the extension to rebundle.
  • Reload the extension.
  • Open the popup. The spinner should briefly show but then you should see the home screen much more quickly.

Screenshots/Recordings

Before

before.mov

After

after.mov

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.

@github-actions
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 metamaskbot added the team-core-platform Core Platform team label Aug 29, 2025
@mcmire mcmire force-pushed the dont-await-net-version-request branch from fd69790 to d9b8ac3 Compare August 29, 2025 14:39
@github-actions github-actions bot added size-M and removed size-S labels Aug 29, 2025
@mcmire mcmire changed the title WIP - Don't await net_version request when booting chore: Don't wait for net_version before starting UI Sep 4, 2025
@mcmire
Copy link
Contributor Author

mcmire commented Sep 4, 2025

Blocked by MetaMask/providers#422.

@mcmire mcmire changed the title chore: Don't wait for net_version before starting UI fix: Prevent lengthy spinner on load when selected network is slow Sep 5, 2025
@mcmire mcmire force-pushed the dont-await-net-version-request branch from d9b8ac3 to 23ecdbf Compare September 8, 2025 21:43
@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: 23ecdbf | Date: 9/8/2025

📄 https://metamask.github.io/test-dapp/

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.29s (±96ms) 🟡 | historical mean value: 1.32s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 973ms (±93ms) 🟢 | historical mean value: 994ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 90ms (±29ms) 🟢 | historical mean value: 99ms ⬇️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.29s 96ms 1.25s 1.83s 1.45s 1.83s
domContentLoaded 973ms 93ms 938ms 1.50s 1.13s 1.50s
firstPaint 90ms 29ms 72ms 268ms 140ms 268ms
firstContentfulPaint 90ms 29ms 72ms 268ms 140ms 268ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [23ecdbf]
UI Startup Metrics (1227 ± 75 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1227110014527512551393
load106595112887310901244
domContentLoaded105894512807210831236
domInteractive18136071738
firstPaint71171129342610771179
backgroundConnect2512372838255270
firstReactRender23185052433
getState1354061824
initialActions51597521
loadScripts814699103471834996
setupStore1053041020
WebpackHomeuiStartup19791500254526721652455
load15761214195819917311861
domContentLoaded15671202194219817221847
domInteractive1712112131448
firstPaint1626744068172309
backgroundConnect3317335323262
firstReactRender95373407881317
getState3353227314277
initialActions7218518614
loadScripts15641200193019717181835
setupStore1162331220
FirefoxBrowserifyHomeuiStartup14121202180112714661678
load1221104615989512871372
domContentLoaded1220104615989512861372
domInteractive1073332759114256
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3418123183686
firstReactRender27214443037
getState829913615
initialActions4043539
loadScripts1195103115779512571345
setupStore12412018854
WebpackHomeuiStartup16351396191513117501840
load14021178164111915041572
domContentLoaded14021178164011915031571
domInteractive1064232351103272
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect32205183847
firstReactRender44366954754
getState73587713
initialActions5114618310
loadScripts13791153162012214841550
setupStore952731015
Benchmark value 252 exceeds gate value 10 for chrome browserify home mean backgroundConnect
Benchmark value 24 exceeds gate value 23 for chrome browserify home mean firstReactRender
Benchmark value 6 exceeds gate value 1 for chrome browserify home mean initialActions
Benchmark value 1394 exceeds gate value 1365 for chrome browserify home p95 uiStartup
Benchmark value 1245 exceeds gate value 1190 for chrome browserify home p95 load
Benchmark value 1236 exceeds gate value 1180 for chrome browserify home p95 domContentLoaded
Benchmark value 271 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 21 exceeds gate value 1.2 for chrome browserify home p95 initialActions
Benchmark value 997 exceeds gate value 940 for chrome browserify home p95 loadScripts
Benchmark value 20 exceeds gate value 17 for chrome browserify home p95 setupStore
Benchmark value 34 exceeds gate value 29 for chrome webpack home mean getState
Benchmark value 8 exceeds gate value 7 for chrome webpack home mean initialActions
Benchmark value 2455 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 277 exceeds gate value 195 for chrome webpack home p95 getState
Benchmark value 14 exceeds gate value 7 for chrome webpack home p95 initialActions
Benchmark value 1412 exceeds gate value 1405 for firefox browserify home mean uiStartup
Benchmark value 34 exceeds gate value 25 for firefox browserify home mean backgroundConnect
Benchmark value 28 exceeds gate value 25 for firefox browserify home mean firstReactRender
Benchmark value 4 exceeds gate value 1 for firefox browserify home mean initialActions
Benchmark value 13 exceeds gate value 9 for firefox browserify home mean setupStore
Benchmark value 1678 exceeds gate value 1660 for firefox browserify home p95 uiStartup
Benchmark value 256 exceeds gate value 195 for firefox browserify home p95 domInteractive
Benchmark value 86 exceeds gate value 70 for firefox browserify home p95 backgroundConnect
Benchmark value 9 exceeds gate value 2 for firefox browserify home p95 initialActions
Benchmark value 54 exceeds gate value 27 for firefox browserify home p95 setupStore
Benchmark value 1636 exceeds gate value 1615 for firefox webpack home mean uiStartup
Benchmark value 1402 exceeds gate value 1380 for firefox webpack home mean load
Benchmark value 1402 exceeds gate value 1380 for firefox webpack home mean domContentLoaded
Benchmark value 107 exceeds gate value 100 for firefox webpack home mean domInteractive
Benchmark value 32 exceeds gate value 26 for firefox webpack home mean backgroundConnect
Benchmark value 45 exceeds gate value 38 for firefox webpack home mean firstReactRender
Benchmark value 6 exceeds gate value 1 for firefox webpack home mean initialActions
Benchmark value 1379 exceeds gate value 1360 for firefox webpack home mean loadScripts
Benchmark value 272 exceeds gate value 156 for firefox webpack home p95 domInteractive
Benchmark value 54 exceeds gate value 50 for firefox webpack home p95 firstReactRender
Benchmark value 10 exceeds gate value 2 for firefox webpack home p95 initialActions
Sum of mean exceeds: 389ms | Sum of p95 exceeds: 819.8ms
Sum of all benchmark exceeds: 1208.8ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 507 Bytes (0.01%)
  • ui: 182 Bytes (0%)
  • common: 244 Bytes (0%)

@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: eaec544 | Date: 9/8/2025

📄 https://metamask.github.io/test-dapp/

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.30s (±129ms) 🟡 | historical mean value: 1.32s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 983ms (±126ms) 🟢 | historical mean value: 994ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 97ms (±57ms) 🟢 | historical mean value: 99ms ⬇️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.30s 129ms 1.25s 1.99s 1.53s 1.99s
domContentLoaded 983ms 126ms 934ms 1.67s 1.20s 1.67s
firstPaint 97ms 57ms 68ms 368ms 276ms 368ms
firstContentfulPaint 97ms 57ms 68ms 368ms 276ms 368ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [eaec544]
UI Startup Metrics (1246 ± 70 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1246111915057012841401
load107997613106811101247
domContentLoaded107296413026711021234
domInteractive18137671728
firstPaint66774126643710861162
backgroundConnect2532382848258268
firstReactRender24164162539
getState1467991828
initialActions51638611
loadScripts826730104666854998
setupStore962021014
WebpackHomeuiStartup19701476267727021552423
load15801188208021817341900
domContentLoaded15721183206521617261885
domInteractive1712105131443
firstPaint1726539862195314
backgroundConnect3218328313158
firstReactRender84373355482270
getState2652855914236
initialActions62244621
loadScripts15661180205421317191882
setupStore1262431319
FirefoxBrowserifyHomeuiStartup13951212195512414531633
load1207107214608512591358
domContentLoaded1207107214598512591358
domInteractive1023428750107240
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3419112153566
firstReactRender27214142936
getState8217019613
initialActions5019420311
loadScripts1182104514378012351328
setupStore10412014926
WebpackHomeuiStartup15841359203915016641848
load13601166170612714451575
domContentLoaded13601166170612714451574
domInteractive105542855399273
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3119135123542
firstReactRender42345344550
getState63182610
initialActions3175736
loadScripts13371142159012614271554
setupStore10514314917
Benchmark value 1247 exceeds gate value 1234 for chrome browserify home mean uiStartup
Benchmark value 1080 exceeds gate value 1070 for chrome browserify home mean load
Benchmark value 1072 exceeds gate value 1061 for chrome browserify home mean domContentLoaded
Benchmark value 254 exceeds gate value 10 for chrome browserify home mean backgroundConnect
Benchmark value 24 exceeds gate value 23 for chrome browserify home mean firstReactRender
Benchmark value 6 exceeds gate value 1 for chrome browserify home mean initialActions
Benchmark value 1401 exceeds gate value 1365 for chrome browserify home p95 uiStartup
Benchmark value 1248 exceeds gate value 1190 for chrome browserify home p95 load
Benchmark value 1235 exceeds gate value 1180 for chrome browserify home p95 domContentLoaded
Benchmark value 268 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 11 exceeds gate value 1.2 for chrome browserify home p95 initialActions
Benchmark value 999 exceeds gate value 940 for chrome browserify home p95 loadScripts
Benchmark value 236 exceeds gate value 195 for chrome webpack home p95 getState
Benchmark value 21 exceeds gate value 7 for chrome webpack home p95 initialActions
Benchmark value 34 exceeds gate value 25 for firefox browserify home mean backgroundConnect
Benchmark value 27 exceeds gate value 25 for firefox browserify home mean firstReactRender
Benchmark value 6 exceeds gate value 1 for firefox browserify home mean initialActions
Benchmark value 11 exceeds gate value 9 for firefox browserify home mean setupStore
Benchmark value 240 exceeds gate value 195 for firefox browserify home p95 domInteractive
Benchmark value 11 exceeds gate value 2 for firefox browserify home p95 initialActions
Benchmark value 105 exceeds gate value 100 for firefox webpack home mean domInteractive
Benchmark value 31 exceeds gate value 26 for firefox webpack home mean backgroundConnect
Benchmark value 43 exceeds gate value 38 for firefox webpack home mean firstReactRender
Benchmark value 4 exceeds gate value 1 for firefox webpack home mean initialActions
Benchmark value 273 exceeds gate value 156 for firefox webpack home p95 domInteractive
Benchmark value 6 exceeds gate value 2 for firefox webpack home p95 initialActions
Sum of mean exceeds: 320ms | Sum of p95 exceeds: 697.8ms
Sum of all benchmark exceeds: 1017.8ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 507 Bytes (0.01%)
  • ui: 182 Bytes (0%)
  • common: 244 Bytes (0%)

When starting, the UI creates a StreamProvider that wraps the MetaMask
provider and can be used to make internal and external requests through
the core JSON-RPC pipeline via the background connection. This
StreamProvider must be initialized in order for the UI to complete the
start sequence and in order for users to see anything on screen.

When the StreamProvider initializes, it will make a background request
for `metamask_getProviderState` to populate its internal state. As a
part of its logic, this RPC method will retrieve the network version
from whichever RPC endpoint is currently selected. However, this creates
a problem, because if the network is slow, this request won't resolve in
a timely manner, causing the UI will be stuck in a loading state and for
users to see a spinner in the meantime.

To address this, this commit changes the `metamask_getProviderState`
handler to accept a parameter, `isInitializingStreamProvider`. It
expects that StreamProvider will call the RPC method and pass `true` for
this parameter. When this happens, the request for `net_version` will
not be made and the initial network version will be set to "loading".
This allows the UI to complete its start sequence. Once the UI is
loaded, it will update the `memStore` state, and
`metamask_getProviderState` will be requested again, but this time,
`isInitializingStreamProvider` will be set to `false`. This means the
network version will be properly retrieved and propagated to all of the
places that need it.
@mcmire mcmire force-pushed the dont-await-net-version-request branch from 24750d2 to 663fe9a Compare September 9, 2025 14:12
@socket-security
Copy link

socket-security bot commented Sep 9, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​metamask/​providers@​22.1.0 ⏵ 22.1.199 +110092 +195 +6100

View full report

@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: 663fe9a | Date: 9/9/2025

📄 https://metamask.github.io/test-dapp/

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.29s (±100ms) 🟡 | historical mean value: 1.31s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 974ms (±97ms) 🟢 | historical mean value: 984ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 92ms (±42ms) 🟢 | historical mean value: 94ms ⬇️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.29s 100ms 1.26s 1.99s 1.34s 1.99s
domContentLoaded 974ms 97ms 938ms 1.65s 1.01s 1.65s
firstPaint 92ms 42ms 72ms 340ms 132ms 340ms
firstContentfulPaint 92ms 42ms 72ms 340ms 132ms 340ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [663fe9a]
UI Startup Metrics (1216 ± 72 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1216108015037212381363
load105691413527110801187
domContentLoaded104790713467310721182
domInteractive17134051725
firstPaint717136129742610741171
backgroundConnect24923634912252265
firstReactRender24188382540
getState1353371629
initialActions51577515
loadScripts806662111172831934
setupStore1062331117
WebpackHomeuiStartup20291522256226722132435
load16161232198220217391927
domContentLoaded16061220196920117311908
domInteractive1912123181470
firstPaint1646243172194317
backgroundConnect3419334323362
firstReactRender92374427385323
getState2952876315269
initialActions7216116713
loadScripts16021218195819917271896
setupStore156278271425
FirefoxBrowserifyHomeuiStartup14161213184411814841621
load1228106614478212941368
domContentLoaded1228106514478112941367
domInteractive1093530152115233
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3420126203491
firstReactRender26223932933
getState8218419615
initialActions3014239
loadScripts1201104714238212641335
setupStore1048112834
WebpackHomeuiStartup15481372216015616491828
load13201169163912514411574
domContentLoaded13201168163912514411574
domInteractive105322805796266
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect32226373645
firstReactRender43336754651
getState7318118611
initialActions501901937
loadScripts12971140160112614191554
setupStore11514415924
Benchmark value 250 exceeds gate value 10 for chrome browserify home mean backgroundConnect
Benchmark value 24 exceeds gate value 23 for chrome browserify home mean firstReactRender
Benchmark value 5 exceeds gate value 1 for chrome browserify home mean initialActions
Benchmark value 1183 exceeds gate value 1180 for chrome browserify home p95 domContentLoaded
Benchmark value 265 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 15 exceeds gate value 1.2 for chrome browserify home p95 initialActions
Benchmark value 8 exceeds gate value 7 for chrome webpack home mean initialActions
Benchmark value 70 exceeds gate value 57 for chrome webpack home p95 domInteractive
Benchmark value 269 exceeds gate value 195 for chrome webpack home p95 getState
Benchmark value 13 exceeds gate value 7 for chrome webpack home p95 initialActions
Benchmark value 1417 exceeds gate value 1405 for firefox browserify home mean uiStartup
Benchmark value 35 exceeds gate value 25 for firefox browserify home mean backgroundConnect
Benchmark value 27 exceeds gate value 25 for firefox browserify home mean firstReactRender
Benchmark value 3 exceeds gate value 1 for firefox browserify home mean initialActions
Benchmark value 11 exceeds gate value 9 for firefox browserify home mean setupStore
Benchmark value 233 exceeds gate value 195 for firefox browserify home p95 domInteractive
Benchmark value 91 exceeds gate value 70 for firefox browserify home p95 backgroundConnect
Benchmark value 9 exceeds gate value 2 for firefox browserify home p95 initialActions
Benchmark value 34 exceeds gate value 27 for firefox browserify home p95 setupStore
Benchmark value 105 exceeds gate value 100 for firefox webpack home mean domInteractive
Benchmark value 32 exceeds gate value 26 for firefox webpack home mean backgroundConnect
Benchmark value 43 exceeds gate value 38 for firefox webpack home mean firstReactRender
Benchmark value 5 exceeds gate value 1 for firefox webpack home mean initialActions
Benchmark value 266 exceeds gate value 156 for firefox webpack home p95 domInteractive
Benchmark value 51 exceeds gate value 50 for firefox webpack home p95 firstReactRender
Benchmark value 7 exceeds gate value 2 for firefox webpack home p95 initialActions
Sum of mean exceeds: 294ms | Sum of p95 exceeds: 545.8ms
Sum of all benchmark exceeds: 839.8ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 307 Bytes (0.01%)
  • ui: 41 Bytes (0%)
  • common: 10 Bytes (0%)

@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: 6b27273 | Date: 9/9/2025

📄 https://metamask.github.io/test-dapp/

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.30s (±125ms) 🟡 | historical mean value: 1.31s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 977ms (±123ms) 🟢 | historical mean value: 990ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 101ms (±103ms) 🟢 | historical mean value: 94ms ⬆️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.30s 125ms 1.25s 2.31s 1.46s 2.31s
domContentLoaded 977ms 123ms 934ms 1.97s 1.13s 1.97s
firstPaint 101ms 103ms 68ms 1.07s 196ms 1.07s
firstContentfulPaint 101ms 103ms 68ms 1.07s 196ms 1.07s
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [6b27273]
UI Startup Metrics (1207 ± 57 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1207109613575712431301
load104493111605410781151
domContentLoaded103792311535410721139
domInteractive16133741722
firstPaint641103116942410631102
backgroundConnect2502362717253261
firstReactRender24156072638
getState14566101631
initialActions40214517
loadScripts79468391053829893
setupStore1062441117
WebpackHomeuiStartup20131515249625421502450
load16071199191419117241879
domContentLoaded15981194189319017161868
domInteractive1812114151448
firstPaint1666247882180348
backgroundConnect3218334323258
firstReactRender79383974880140
getState3543147614265
initialActions8227627713
loadScripts15941192188218917141856
setupStore176292381323
FirefoxBrowserifyHomeuiStartup14821304183510215551667
load1289113615338013471421
domContentLoaded1289113615338013471421
domInteractive1183532059133268
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3720137223698
firstReactRender29235763042
getState838311618
initialActions41304413
loadScripts1260111514637813161396
setupStore105618830
WebpackHomeuiStartup15601334187013416681815
load13371146158912114461557
domContentLoaded13371146158912114461557
domInteractive102322805398268
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect30208683540
firstReactRender42355244548
getState5312279
initialActions3025335
loadScripts13151130156712314261539
setupStore10613313916
Benchmark value 250 exceeds gate value 10 for chrome browserify home mean backgroundConnect
Benchmark value 24 exceeds gate value 23 for chrome browserify home mean firstReactRender
Benchmark value 5 exceeds gate value 1 for chrome browserify home mean initialActions
Benchmark value 261 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 17 exceeds gate value 1.2 for chrome browserify home p95 initialActions
Benchmark value 36 exceeds gate value 29 for chrome webpack home mean getState
Benchmark value 9 exceeds gate value 7 for chrome webpack home mean initialActions
Benchmark value 349 exceeds gate value 334 for chrome webpack home p95 firstPaint
Benchmark value 265 exceeds gate value 195 for chrome webpack home p95 getState
Benchmark value 13 exceeds gate value 7 for chrome webpack home p95 initialActions
Benchmark value 1483 exceeds gate value 1405 for firefox browserify home mean uiStartup
Benchmark value 1289 exceeds gate value 1245 for firefox browserify home mean load
Benchmark value 1289 exceeds gate value 1239 for firefox browserify home mean domContentLoaded
Benchmark value 118 exceeds gate value 110 for firefox browserify home mean domInteractive
Benchmark value 37 exceeds gate value 25 for firefox browserify home mean backgroundConnect
Benchmark value 29 exceeds gate value 25 for firefox browserify home mean firstReactRender
Benchmark value 4 exceeds gate value 1 for firefox browserify home mean initialActions
Benchmark value 1261 exceeds gate value 1230 for firefox browserify home mean loadScripts
Benchmark value 10 exceeds gate value 9 for firefox browserify home mean setupStore
Benchmark value 1667 exceeds gate value 1660 for firefox browserify home p95 uiStartup
Benchmark value 268 exceeds gate value 195 for firefox browserify home p95 domInteractive
Benchmark value 98 exceeds gate value 70 for firefox browserify home p95 backgroundConnect
Benchmark value 13 exceeds gate value 2 for firefox browserify home p95 initialActions
Benchmark value 30 exceeds gate value 27 for firefox browserify home p95 setupStore
Benchmark value 103 exceeds gate value 100 for firefox webpack home mean domInteractive
Benchmark value 31 exceeds gate value 26 for firefox webpack home mean backgroundConnect
Benchmark value 42 exceeds gate value 38 for firefox webpack home mean firstReactRender
Benchmark value 3 exceeds gate value 1 for firefox webpack home mean initialActions
Benchmark value 268 exceeds gate value 156 for firefox webpack home p95 domInteractive
Benchmark value 5 exceeds gate value 2 for firefox webpack home p95 initialActions
Sum of mean exceeds: 499ms | Sum of p95 exceeds: 586.8ms
Sum of all benchmark exceeds: 1085.8ms

Bundle size diffs [🚀 Bundle size reduced!]
  • background: 560 Bytes (0.01%)
  • ui: 19.02 KiB (0.25%)
  • common: -3.97 KiB (-0.05%)

@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: aa5d781 | Date: 9/9/2025

📄 https://metamask.github.io/test-dapp/

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.29s (±77ms) 🟡 | historical mean value: 1.31s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 969ms (±75ms) 🟢 | historical mean value: 990ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 88ms (±18ms) 🟢 | historical mean value: 94ms ⬇️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.29s 77ms 1.25s 2.02s 1.35s 2.02s
domContentLoaded 969ms 75ms 939ms 1.69s 1.02s 1.69s
firstPaint 88ms 18ms 72ms 172ms 140ms 172ms
firstContentfulPaint 88ms 18ms 72ms 172ms 140ms 172ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [aa5d781]
UI Startup Metrics (1226 ± 62 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1226111414156212691320
load106296512195710981156
domContentLoaded105495712075710891151
domInteractive17144361739
firstPaint64384120143210681138
backgroundConnect2522402808255270
firstReactRender24174462438
getState1347481624
initialActions51425612
loadScripts80970395057844906
setupStore962021014
WebpackHomeuiStartup20861625262923322372483
load16701308203617817941892
domContentLoaded16601304202017817881883
domInteractive181293131554
firstPaint1717149070193307
backgroundConnect3718362473372
firstReactRender90383376687313
getState3653237515271
initialActions62254613
loadScripts16561300200917717851871
setupStore196294371631
FirefoxBrowserifyHomeuiStartup13901207184412514471641
load1201106014378912661367
domContentLoaded1201106014378912661367
domInteractive1043426244108223
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect322096143661
firstReactRender28226762939
getState928915644
initialActions511871938
loadScripts1177104214178712441336
setupStore94508825
WebpackHomeuiStartup15911386212217116901955
load13511177183913914421590
domContentLoaded13511176183813914411589
domInteractive1043131054101258
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3422216213644
firstReactRender44325344750
getState7212712610
initialActions712172539
loadScripts13261159166713314201571
setupStore1057681020
Benchmark value 252 exceeds gate value 10 for chrome browserify home mean backgroundConnect
Benchmark value 24 exceeds gate value 23 for chrome browserify home mean firstReactRender
Benchmark value 5 exceeds gate value 1 for chrome browserify home mean initialActions
Benchmark value 271 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 12 exceeds gate value 1.2 for chrome browserify home p95 initialActions
Benchmark value 36 exceeds gate value 29 for chrome webpack home mean getState
Benchmark value 2483 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 271 exceeds gate value 195 for chrome webpack home p95 getState
Benchmark value 13 exceeds gate value 7 for chrome webpack home p95 initialActions
Benchmark value 32 exceeds gate value 25 for firefox browserify home mean backgroundConnect
Benchmark value 28 exceeds gate value 25 for firefox browserify home mean firstReactRender
Benchmark value 5 exceeds gate value 1 for firefox browserify home mean initialActions
Benchmark value 223 exceeds gate value 195 for firefox browserify home p95 domInteractive
Benchmark value 44 exceeds gate value 24 for firefox browserify home p95 getState
Benchmark value 8 exceeds gate value 2 for firefox browserify home p95 initialActions
Benchmark value 105 exceeds gate value 100 for firefox webpack home mean domInteractive
Benchmark value 34 exceeds gate value 26 for firefox webpack home mean backgroundConnect
Benchmark value 44 exceeds gate value 38 for firefox webpack home mean firstReactRender
Benchmark value 7 exceeds gate value 1 for firefox webpack home mean initialActions
Benchmark value 1955 exceeds gate value 1935 for firefox webpack home p95 uiStartup
Benchmark value 258 exceeds gate value 156 for firefox webpack home p95 domInteractive
Benchmark value 9 exceeds gate value 2 for firefox webpack home p95 initialActions
Sum of mean exceeds: 293ms | Sum of p95 exceeds: 557.8ms
Sum of all benchmark exceeds: 850.8ms

Bundle size diffs [🚀 Bundle size reduced!]
  • background: 597 Bytes (0.01%)
  • ui: 19.02 KiB (0.25%)
  • common: -3.97 KiB (-0.05%)

@mcmire mcmire marked this pull request as ready for review September 9, 2025 22:07
Copy link
Contributor

@cryptodev-2s cryptodev-2s left a comment

Choose a reason for hiding this comment

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

LGTM!

@mcmire mcmire added this pull request to the merge queue Sep 10, 2025
Merged via the queue into main with commit 319b804 Sep 10, 2025
150 checks passed
@mcmire mcmire deleted the dont-await-net-version-request branch September 10, 2025 13:48
@github-actions github-actions bot locked and limited conversation to collaborators Sep 10, 2025
@metamaskbot metamaskbot added the release-13.4.0 Issue or pull request that will be included in release 13.4.0 label Sep 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-13.4.0 Issue or pull request that will be included in release 13.4.0 size-M team-core-platform Core Platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants