Skip to content

feat: cache bridge getToken responses#39541

Merged
micaelae merged 28 commits intomainfrom
swaps3230-asset-caching
Jan 30, 2026
Merged

feat: cache bridge getToken responses#39541
micaelae merged 28 commits intomainfrom
swaps3230-asset-caching

Conversation

@micaelae
Copy link
Copy Markdown
Member

@micaelae micaelae commented Jan 27, 2026

Description

This adds progressive caching for search and popular endpoints

  1. a new cache entry is created when the search query changes, user's balance changes, or the selected asset changes
  2. an existing cache entry is updated when a new page of data is fetched, initial timestamp is preserved
  3. a cache entry is invalidated when its hash doesn't match the cached data (if storage entry is modified outside swaps flow)
  4. all search cache entries are invalidated when the swap page loads and unloads, or if it is older than 15 minutes
  5. popular cache is cleared when the swap page loads and if the cache item is older than 15 minutes

Cache Schema

type Response = type of popular or search tokens responses

{
  ["bridgeCache" + url + <hash of request data>]:  {
    timestamp: <when the cache entry was first added in ms>
    default: {
      cachedResponse: <popular or search tokens responses>,
      hash: <hash of the response, used for invalidating malformed storage items>
    }
    <page cursor>:  {
      ... same schema as default
    }
  }
}

Open in GitHub Codespaces

Changelog

CHANGELOG entry: feat: cache bridge getToken responses

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/SWAPS-3230

Manual testing steps

  1. Verify that localforage entries include 2 "bridgeCache" entries when Swap page loads
  2. Reopen the swap page, verify that no new popular network calls are made
  3. Search for a token, verify that cache entries are added
  4. Close asset-picker then reopen
  5. Search for the same token, verify that no network calls are made
  6. Exit swap page, verify that search cache items are cleared

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.

Note

Medium Risk
Adds a new local storage-backed caching layer for bridge token list fetches; risk is mainly around stale/incorrect cache invalidation or hashing leading to missing/old token results.

Overview
Bridge token list requests are now cached in local storage to reduce repeated calls to getTokens/popular and getTokens/search.

A new ui/pages/bridge/utils/cache.ts module hashes request bodies to generate cache keys, stores responses (including paged search results) with a 15-minute TTL, and invalidates entries on staleness or hash mismatch. Bridge lifecycle flows (useBridging.openBridgeExperience and resetBridgeState) now clear relevant cache entries.

Requests to the bridge API are normalized to only include minimal asset fields in includeAssets to keep cache keys stable, and tests were updated/added to assert cache behavior and localforage state.

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

@metamaskbot metamaskbot added the team-swaps-and-bridge Swaps and Bridge team label Jan 27, 2026
@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Jan 27, 2026

✨ Files requiring CODEOWNER review ✨

🔄 @MetaMask/swaps-engineers (7 files, +648 -44)
  • 📁 ui/
    • 📁 ducks/
      • 📁 bridge/
        • 📄 actions.ts +2 -0
    • 📁 hooks/
      • 📁 bridge/
        • 📄 useBridging.ts +2 -0
    • 📁 pages/
      • 📁 bridge/
        • 📁 prepare/
          • 📁 __snapshots__/
            • 📄 bridge-input-group.test.tsx.snap +22 -6
            • 📄 bridge-input-group.test.tsx +10 -4
        • 📁 utils/
          • 📄 cache.ts +87 -0
          • 📄 tokens.test.ts +437 -0
          • 📄 tokens.ts +88 -34

@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Jan 27, 2026

Builds ready [b380494]
UI Startup Metrics (1278 ± 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--12781079161610013461442
load--107189214079711361251
domContentLoaded--106588714009711311247
domInteractive--261684172475
firstPaint--162651183180179284
backgroundConnect--22821032117232254
firstReactRender--16105161724
initialActions--109112
loadScripts--8506731186989151037
setupStore--1265971423
numNetworkReqs--201380181373
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--19341537246818520202392
load--1079933152113111001426
domContentLoaded--1063920151212910931408
domInteractive--38191762737100
firstPaint--195731449192232387
backgroundConnect--32428059663319517
firstReactRender--24164972837
initialActions--105113
loadScripts--83170012851238521164
setupStore--1583041722
numNetworkReqs--69371743965166
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--81665911551008731006
load--67759397877726803
domContentLoaded--67258896777722798
domInteractive--241586172177
firstPaint--975735248103186
backgroundConnect--39181562644106
firstReactRender--14103541623
initialActions--106114
loadScripts--67058696476720795
setupStore--1053851123
numNetworkReqs--191380171369
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--1254860212924414461681
load--7116101157114713995
domContentLoaded--7026051144115698992
domInteractive--39174514935115
firstPaint--1436553687188334
backgroundConnect--17013256488155486
firstReactRender--22173332427
initialActions--102011
loadScripts--6996031142113695982
setupStore--1152131318
numNetworkReqs--1103723954138228
19--------
FirefoxBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--13791092177017115061708
load--1119927152312312091344
domContentLoaded--1119927152312312081344
domInteractive--67312284090133
firstPaint--------
backgroundConnect--682530851101165
firstReactRender--1394471235
initialActions--102112
loadScripts--1083913141310611641273
setupStore--12421923933
numNetworkReqs--221187201580
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--26011680510660726834124
load--12991039270239612952450
domContentLoaded--12981039270239612952449
domInteractive--12835851140115394
firstPaint--------
backgroundConnect--3201001820334255957
firstReactRender--20146252226
initialActions--103122
loadScripts--12361017258733412642347
setupStore--1679778210224669
numNetworkReqs--61291673480131
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--15871259209118017191924
load--13541137171212514391571
domContentLoaded--13541137171212514391571
domInteractive--832640851113139
firstPaint--------
backgroundConnect--772423853117194
firstReactRender--15118881520
initialActions--2042422
loadScripts--13111125168610613711508
setupStore--2142454211128
numNetworkReqs--211183181675
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--30391981493977837774617
load--16441218311548517752779
domContentLoaded--16441218311548517742779
domInteractive--1013282910598389
firstPaint--------
backgroundConnect--38311317993714001159
firstReactRender--23156482438
initialActions--204123
loadScripts--15671197296241417542582
setupStore--1725779237309757
numNetworkReqs--60281783975160
19--------
📊 Page Load Benchmark Results

Current Commit: b380494 | Date: 1/27/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.03s (±37ms) 🟡 | historical mean value: 1.04s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 720ms (±35ms) 🟢 | historical mean value: 728ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 76ms (±11ms) 🟢 | historical mean value: 77ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.03s 37ms 1.01s 1.32s 1.05s 1.32s
domContentLoaded 720ms 35ms 702ms 989ms 739ms 989ms
firstPaint 76ms 11ms 56ms 164ms 84ms 164ms
firstContentfulPaint 76ms 11ms 56ms 164ms 84ms 164ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚀 Bundle size reduced!]
  • background: 212.54 KiB (4.32%)
  • ui: 1021 Bytes (0.01%)
  • common: -260.63 KiB (-2.78%)

@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Jan 27, 2026

Builds ready [e851094]
UI Startup Metrics (1295 ± 112 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--12951061156611213591525
load--1099886134510111551294
domContentLoaded--1092881133610111501288
domInteractive--261689172376
firstPaint--159651208156184304
backgroundConnect--22821030713231248
firstReactRender--18113552030
initialActions--106112
loadScripts--8776761120999341065
setupStore--1263251520
numNetworkReqs--191371151365
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--264616028815131927725295
load--1178936188916513071429
domContentLoaded--1155929187416312801426
domInteractive--36181602636103
firstPaint--224681249129268342
backgroundConnect--65427743077514922710
firstReactRender--25166792745
initialActions--106113
loadScripts--919716161015310401182
setupStore--1674481835
numNetworkReqs--944826542100205
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--84767011951059231028
load--69360192280752842
domContentLoaded--68759690878746832
domInteractive--251685162271
firstPaint--1106281785127228
backgroundConnect--43191372750117
firstReactRender--15103551826
initialActions--105112
loadScripts--68559490577744830
setupStore--12699101225
numNetworkReqs--191379171369
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--1227839186222614131682
load--710593107599738944
domContentLoaded--700589106798727930
domInteractive--3418147223392
firstPaint--150681059139178333
backgroundConnect--1665656267160296
firstReactRender--21133642329
initialActions--102111
loadScripts--697587106097725927
setupStore--1243551418
numNetworkReqs--1094627147129210
19--------
FirefoxBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--15201150224520416281901
load--1229989195816512831560
domContentLoaded--1229988195816512831560
domInteractive--813023846110178
firstPaint--------
backgroundConnect--74263295991197
firstReactRender--1392531419
initialActions--103123
loadScripts--1189973193015312261447
setupStore--154136201455
numNetworkReqs--211186191578
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--26551898839575327503498
load--12701033640653812991597
domContentLoaded--12701033640653812981597
domInteractive--1373950395160334
firstPaint--------
backgroundConnect--38610215223036131120
firstReactRender--22147082331
initialActions--213123
loadScripts--12221012636653312241445
setupStore--14912833188147639
numNetworkReqs--80372294781211
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--16491338206415617721943
load--14021181173411914871598
domContentLoaded--14021181173411914871597
domInteractive--973023146133163
firstPaint--------
backgroundConnect--752720148120172
firstReactRender--14112731520
initialActions--103122
loadScripts--1359116716339714261543
setupStore--13698131241
numNetworkReqs--221185201581
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--301520299828105231364460
load--15571275380539515662648
domContentLoaded--15571275380539515652648
domInteractive--127401067118140279
firstPaint--------
backgroundConnect--5137763247786521162
firstReactRender--21155052430
initialActions--203123
loadScripts--15111256293733715402496
setupStore--16581105230159759
numNetworkReqs--78312674680192
19--------
📊 Page Load Benchmark Results

Current Commit: e851094 | Date: 1/27/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±443ms) 🟡 | historical mean value: 1.05s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 749ms (±482ms) 🟢 | historical mean value: 730ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 157ms (±572ms) 🟢 | historical mean value: 80ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 443ms 960ms 4.60s 1.01s 4.60s
domContentLoaded 749ms 482ms 663ms 4.57s 706ms 4.57s
firstPaint 157ms 572ms 60ms 4.62s 88ms 4.62s
firstContentfulPaint 157ms 572ms 60ms 4.62s 88ms 4.62s
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚀 Bundle size reduced!]
  • background: 213.33 KiB (4.34%)
  • ui: 7.54 KiB (0.09%)
  • common: -261.16 KiB (-2.79%)

@micaelae micaelae marked this pull request as ready for review January 27, 2026 19:57
@micaelae micaelae requested a review from a team as a code owner January 27, 2026 19:57
@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Jan 27, 2026

Builds ready [9ccb486]
UI Startup Metrics (1319 ± 105 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--13191082160210513821524
load--1133914142610011891306
domContentLoaded--1126907141810011821299
domInteractive--261686162378
firstPaint--188651223210199333
backgroundConnect--23521627512240264
firstReactRender--16102841823
initialActions--106111
loadScripts--9056961191999641082
setupStore--1273241521
numNetworkReqs--191378161365
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--22731606631486522604860
load--1120953159113511811412
domContentLoaded--1100940158113211661347
domInteractive--39192713534102
firstPaint--201681536158236361
backgroundConnect--49527731935113791911
firstReactRender--25164872840
initialActions--106112
loadScripts--86271212891269001114
setupStore--1675271830
numNetworkReqs--79421983988170
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--8296771155938711005
load--68359290975746815
domContentLoaded--67858790474742804
domInteractive--251581162273
firstPaint--966226944105197
backgroundConnect--3718114204574
firstReactRender--16104961725
initialActions--104112
loadScripts--67558590273740796
setupStore--1264471328
numNetworkReqs--201386181375
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--1292815195821314651619
load--733612100287759945
domContentLoaded--72360899387754939
domInteractive--35191292433104
firstPaint--1566541171206282
backgroundConnect--1725458091164457
firstReactRender--23163632429
initialActions--103111
loadScripts--72060698486751930
setupStore--1252031417
numNetworkReqs--78372374394156
19--------
FirefoxBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--15161215221421716342053
load--12131031192915512881466
domContentLoaded--12131031192815512881466
domInteractive--753528249100154
firstPaint--------
backgroundConnect--72283375697183
firstReactRender--14104651421
initialActions--103122
loadScripts--11741015189913912421393
setupStore--1951923313134
numNetworkReqs--211180181672
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--28151828746479829164176
load--12761034266625912841780
domContentLoaded--12761034266625912841780
domInteractive--13735855113138310
firstPaint--------
backgroundConnect--44712519554245491632
firstReactRender--21145052328
initialActions--207123
loadScripts--12291014264524712371712
setupStore--168101351224193663
numNetworkReqs--72312264279183
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--16591337224618517831973
load--14231161186913315021699
domContentLoaded--14231161186913315021699
domInteractive--953028850134161
firstPaint--------
backgroundConnect--762621349121182
firstReactRender--14112631422
initialActions--103112
loadScripts--13791141175411414351630
setupStore--2232484213143
numNetworkReqs--211186181575
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--30301991841180931494365
load--16621293591255816952691
domContentLoaded--16611293591155816952691
domInteractive--1183642878133309
firstPaint--------
backgroundConnect--38011623473434231025
firstReactRender--23165772432
initialActions--203123
loadScripts--16011274587254216092588
setupStore--16310794209188655
numNetworkReqs--70281924479186
19--------
📊 Page Load Benchmark Results

Current Commit: 9ccb486 | Date: 1/27/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±69ms) 🟡 | historical mean value: 1.04s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 727ms (±68ms) 🟢 | historical mean value: 725ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 75ms (±10ms) 🟢 | historical mean value: 81ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 69ms 998ms 1.31s 1.24s 1.31s
domContentLoaded 727ms 68ms 690ms 995ms 922ms 995ms
firstPaint 75ms 10ms 60ms 160ms 84ms 160ms
firstContentfulPaint 75ms 10ms 60ms 160ms 84ms 160ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 430.84 KiB (8.75%)
  • ui: 9.74 KiB (0.12%)
  • common: -42.16 KiB (-0.45%)

@micaelae micaelae enabled auto-merge January 27, 2026 20:47
@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Jan 29, 2026

Builds ready [3a23429]
UI Startup Metrics (1341 ± 121 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--13411076161912114181562
load--1144904141611712211334
domContentLoaded--1138899140511712151326
domInteractive--261693182480
firstPaint--1396931860184278
backgroundConnect--23321827511239254
firstReactRender--16103341823
initialActions--106113
loadScripts--92068611901179901111
setupStore--1374061524
numNetworkReqs--211579161570
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--292815928256147141246241
load--1137944187915212091458
domContentLoaded--1114932185914711651427
domInteractive--38172233337108
firstPaint--238741881224253481
backgroundConnect--844290474985510872687
firstReactRender--24155662834
initialActions--105112
loadScripts--88671415581429361209
setupStore--1464161723
numNetworkReqs--1055025647114242
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--85768112241109381053
load--7135981113105779939
domContentLoaded--7085941108104776933
domInteractive--2615123192375
firstPaint--1116270574143192
backgroundConnect--3719136214088
firstReactRender--15103251725
initialActions--106112
loadScripts--7055921106104774930
setupStore--1152741225
numNetworkReqs--221583171573
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--1353878284032815801863
load--73060613611227351009
domContentLoaded--71860113491227191006
domInteractive--3617113203888
firstPaint--166681100130191423
backgroundConnect--16313151658160267
firstReactRender--23173742531
initialActions--105111
loadScripts--7165991342120716998
setupStore--1244351424
numNetworkReqs--1615335155178295
19--------
FirefoxBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--14211125190517215001797
load--1149946169013212271434
domContentLoaded--1149946168913212271434
domInteractive--76342594899151
firstPaint--------
backgroundConnect--61252164865182
firstReactRender--1395051316
initialActions--103122
loadScripts--1114931166411411781351
setupStore--174209311075
numNetworkReqs--221287171873
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--29031958686573430503897
load--14001022506451814281976
domContentLoaded--14001022506451814271976
domInteractive--159541295163147475
firstPaint--------
backgroundConnect--53112227974107861243
firstReactRender--22154662431
initialActions--213123
loadScripts--13041000502643913181682
setupStore--10219674127107442
numNetworkReqs--974325246101217
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--16371353221519017432017
load--13991182186412814741630
domContentLoaded--13991176186412814731629
domInteractive--823018240116140
firstPaint--------
backgroundConnect--70232535390177
firstReactRender--14112221519
initialActions--102122
loadScripts--13601165175910914271559
setupStore--155152241161
numNetworkReqs--231285171976
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--29482206579445031393607
load--15651268400535216012169
domContentLoaded--15641267400535216012169
domInteractive--14641649114168401
firstPaint--------
backgroundConnect--43312112352926371000
firstReactRender--21145662332
initialActions--2038423
loadScripts--15271242396935115642097
setupStore--17410778189278581
numNetworkReqs--94382905095217
19--------
📊 Page Load Benchmark Results

Current Commit: 3a23429 | Date: 1/29/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.06s (±52ms) 🟡 | historical mean value: 1.04s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 740ms (±46ms) 🟢 | historical mean value: 725ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 79ms (±14ms) 🟢 | historical mean value: 79ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.06s 52ms 1.01s 1.39s 1.14s 1.39s
domContentLoaded 740ms 46ms 703ms 1.04s 802ms 1.04s
firstPaint 79ms 14ms 60ms 200ms 92ms 200ms
firstContentfulPaint 79ms 14ms 60ms 200ms 92ms 200ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 2.17 KiB (0.03%)
  • common: 279 Bytes (0%)

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 29, 2026

Builds ready [b3ffc30]
UI Startup Metrics (1316 ± 110 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--13161059172111013751508
load--1125906146311011921312
domContentLoaded--1119900145810911841307
domInteractive--261696152471
firstPaint--166651188173190297
backgroundConnect--23821827713247266
firstReactRender--17104252025
initialActions--1010215
loadScripts--89468312381119641101
setupStore--1272541620
numNetworkReqs--211588161573
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--312015978455154143535684
load--1180976178113512341431
domContentLoaded--1161966176913012121413
domInteractive--34192202734102
firstPaint--230871350213251456
backgroundConnect--10942875608111519163283
firstReactRender--24164362737
initialActions--107112
loadScripts--91874614491199791144
setupStore--1574871832
numNetworkReqs--1074825643115224
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--8476691086969171023
load--70759297389774873
domContentLoaded--70158896887768866
domInteractive--251598172275
firstPaint--1016032752115215
backgroundConnect--3718132214285
firstReactRender--15103451624
initialActions--105112
loadScripts--69858696686766864
setupStore--1255481237
numNetworkReqs--221582171573
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--1290930233029014961898
load--73461612991257271055
domContentLoaded--72260912911257141043
domInteractive--39182283138107
firstPaint--15864639114158535
backgroundConnect--16613152271151370
firstReactRender--23194542532
initialActions--101011
loadScripts--71960712811237121034
setupStore--1242441418
numNetworkReqs--1555632254175280
19--------
FirefoxBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--14531168205118215641775
load--11861006179915312751482
domContentLoaded--11861005179815312741482
domInteractive--793431550102166
firstPaint--------
backgroundConnect--71263335982215
firstReactRender--1394241317
initialActions--102122
loadScripts--1146990176713612191370
setupStore--144154201039
numNetworkReqs--241290191878
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--29551909894787231603956
load--13881100359533315081824
domContentLoaded--13881099357633115081824
domInteractive--17654673131216472
firstPaint--------
backgroundConnect--57911965436857971219
firstReactRender--22143342530
initialActions--217123
loadScripts--13131073340828713761657
setupStore--11414526124129465
numNetworkReqs--96452645095239
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--17111387281523518482063
load--14701201242917215801727
domContentLoaded--14691201242917215801726
domInteractive--923138756133153
firstPaint--------
backgroundConnect--752521249121191
firstReactRender--14112421519
initialActions--106122
loadScripts--14221182231415015201607
setupStore--144143181340
numNetworkReqs--241290201782
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--28182087458144130843574
load--14961282207417015951850
domContentLoaded--14951282207317015951850
domInteractive--1335447591142340
firstPaint--------
backgroundConnect--43110414343187251058
firstReactRender--21144652331
initialActions--207123
loadScripts--14421238192214715511732
setupStore--14113623163167563
numNetworkReqs--96342814994212
19--------
📊 Page Load Benchmark Results

Current Commit: b3ffc30 | Date: 1/29/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±39ms) 🟡 | historical mean value: 1.04s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 721ms (±36ms) 🟢 | historical mean value: 725ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 76ms (±14ms) 🟢 | historical mean value: 79ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 39ms 1.02s 1.32s 1.06s 1.32s
domContentLoaded 721ms 36ms 697ms 985ms 748ms 985ms
firstPaint 76ms 14ms 60ms 204ms 84ms 204ms
firstContentfulPaint 76ms 14ms 60ms 204ms 84ms 204ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 2.04 KiB (0.02%)
  • common: 239 Bytes (0%)

@micaelae micaelae added this pull request to the merge queue Jan 29, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 29, 2026
@micaelae micaelae added this pull request to the merge queue Jan 29, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 30, 2026
@micaelae micaelae enabled auto-merge January 30, 2026 01:11
@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Jan 30, 2026

Builds ready [065a794]
UI Startup Metrics (1332 ± 102 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--13321102163910213811542
load--1125918143410311781347
domContentLoaded--1118913142910311711331
domInteractive--271793182382
firstPaint--178661203183198325
backgroundConnect--23822329712242263
firstReactRender--17104561937
initialActions--108113
loadScripts--89469611931049561105
setupStore--1363661624
numNetworkReqs--211579161571
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--290115318115141240775842
load--1166956166715512181488
domContentLoaded--1144943163614711901479
domInteractive--40192884233134
firstPaint--227691586209255405
backgroundConnect--856281361785812272782
firstReactRender--25175472841
initialActions--104112
loadScripts--90172413671399221232
setupStore--16569101936
numNetworkReqs--1264925648148240
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--82265611191038861036
load--68558897488747881
domContentLoaded--67958596187743875
domInteractive--241591172175
firstPaint--996129647117192
backgroundConnect--39181352545100
firstReactRender--1492741624
initialActions--105112
loadScripts--67758395886738873
setupStore--1152641122
numNetworkReqs--221582181578
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--1313898267229314881836
load--72863111171107341042
domContentLoaded--71762411071107181035
domInteractive--38192223237106
firstPaint--1486750882183305
backgroundConnect--16213239244163294
firstReactRender--23183742432
initialActions--103112
loadScripts--71462110991097151026
setupStore--1243241519
numNetworkReqs--1535035262170297
19--------
FirefoxBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--14531150191215215191747
load--1175996148410612471360
domContentLoaded--1175991148410612471360
domInteractive--833735650116142
firstPaint--------
backgroundConnect--64262484387161
firstReactRender--13104541417
initialActions--103122
loadScripts--113798314079111941322
setupStore--166193281239
numNetworkReqs--231292191879
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--27762025708862329243565
load--13091041232827414081936
domContentLoaded--13091041232827414081936
domInteractive--181411279198203528
firstPaint--------
backgroundConnect--43112614103036041032
firstReactRender--21146762228
initialActions--203122
loadScripts--12441012227023413351675
setupStore--15713786191222594
numNetworkReqs--92392374699225
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--16441372226817517471991
load--14121204190813214941607
domContentLoaded--14111204190713214931606
domInteractive--913025445130159
firstPaint--------
backgroundConnect--752518249121177
firstReactRender--14102421419
initialActions--103122
loadScripts--13661188186911714161551
setupStore--163180261165
numNetworkReqs--231288191877
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--30082102528748131854048
load--15791296391131716932074
domContentLoaded--15791296391131716932074
domInteractive--14836711114165443
firstPaint--------
backgroundConnect--46111813622896561049
firstReactRender--22167472430
initialActions--204123
loadScripts--15341272374230316242002
setupStore--14410727177167588
numNetworkReqs--91402284599208
19--------
📊 Page Load Benchmark Results

Current Commit: 065a794 | Date: 1/30/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±40ms) 🟡 | historical mean value: 1.04s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 728ms (±37ms) 🟢 | historical mean value: 722ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 79ms (±13ms) 🟢 | historical mean value: 79ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 40ms 1.02s 1.35s 1.07s 1.35s
domContentLoaded 728ms 37ms 706ms 1.02s 743ms 1.02s
firstPaint 79ms 13ms 60ms 196ms 88ms 196ms
firstContentfulPaint 79ms 13ms 60ms 196ms 88ms 196ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 2.04 KiB (0.02%)
  • common: 239 Bytes (0%)

@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Jan 30, 2026

Builds ready [53538c5]
UI Startup Metrics (1334 ± 96 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--1334109816089614021476
load--114392814049612101267
domContentLoaded--113691913969612051263
domInteractive--2816127192474
firstPaint--167661328139207322
backgroundConnect--24422130314249274
firstReactRender--17113251926
initialActions--1010113
loadScripts--9097051168959731043
setupStore--1363551523
numNetworkReqs--211578161569
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--18851553248916419642161
load--1060943178714210561415
domContentLoaded--1047931176914110441409
domInteractive--3317155233293
firstPaint--191691490202227326
backgroundConnect--31427444025325361
firstReactRender--22154762435
initialActions--104112
loadScripts--81270014371288191142
setupStore--1473961624
numNetworkReqs--79471834175175
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--84966711141009141025
load--70159994281774846
domContentLoaded--69659593880768839
domInteractive--251682172277
firstPaint--1096134252145197
backgroundConnect--40191812843105
firstReactRender--1593051828
initialActions--103112
loadScripts--69359393679759837
setupStore--1172741223
numNetworkReqs--221588181579
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--1258870185922014051661
load--72161911601187191074
domContentLoaded--71161511531187131067
domInteractive--35181822932110
firstPaint--14565976146148415
backgroundConnect--16713239652165301
firstReactRender--23174042529
initialActions--103111
loadScripts--70961311431167111058
setupStore--1252331418
numNetworkReqs--1245426959153256
19--------
FirefoxBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--14731169217420216111931
load--1180989178715412491482
domContentLoaded--1179988178615412481482
domInteractive--75303684999143
firstPaint--------
backgroundConnect--712419549106179
firstReactRender--1810508501337
initialActions--103122
loadScripts--1139968166313411941442
setupStore--153225251142
numNetworkReqs--241289201881
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--26691908501956927024019
load--12911055238532112182266
domContentLoaded--12911055238532112182266
domInteractive--11735600104114370
firstPaint--------
backgroundConnect--32311514923153121100
firstReactRender--21147372229
initialActions--206123
loadScripts--12341031225325711911798
setupStore--1606933211181628
numNetworkReqs--72392124494185
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--17631450356927318402288
load--15091244330223615701887
domContentLoaded--15081244330223615691887
domInteractive--104321694165130147
firstPaint--------
backgroundConnect--73263445493169
firstReactRender--16126861622
initialActions--103122
loadScripts--14661199327322415241776
setupStore--145116171353
numNetworkReqs--221283161869
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--30492276602159932504245
load--16951321517249218252604
domContentLoaded--16941321517249218242604
domInteractive--12833631118119455
firstPaint--------
backgroundConnect--2871221361218299827
firstReactRender--2415140122631
initialActions--207123
loadScripts--16421299514247617252475
setupStore--1597784208217650
numNetworkReqs--70391794176173
19--------
📊 Page Load Benchmark Results

Current Commit: 53538c5 | Date: 1/30/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±37ms) 🟡 | historical mean value: 1.03s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 722ms (±35ms) 🟢 | historical mean value: 718ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 77ms (±10ms) 🟢 | historical mean value: 77ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 37ms 1.01s 1.31s 1.07s 1.31s
domContentLoaded 722ms 35ms 700ms 987ms 744ms 987ms
firstPaint 77ms 10ms 60ms 152ms 92ms 152ms
firstContentfulPaint 77ms 10ms 60ms 152ms 92ms 152ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 2.04 KiB (0.02%)
  • common: 239 Bytes (0%)

@micaelae micaelae added this pull request to the merge queue Jan 30, 2026
Merged via the queue into main with commit d4cce77 Jan 30, 2026
179 checks passed
@micaelae micaelae deleted the swaps3230-asset-caching branch January 30, 2026 17:54
@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

release-13.18.0 Issue or pull request that will be included in release 13.18.0 size-L team-swaps-and-bridge Swaps and Bridge team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants