Skip to content

chore: integrate storage service with tokenListController#39250

Merged
sahar-fehri merged 25 commits intomainfrom
chore/integrate-storage-service-with-tokenListController
Jan 29, 2026
Merged

chore: integrate storage service with tokenListController#39250
sahar-fehri merged 25 commits intomainfrom
chore/integrate-storage-service-with-tokenListController

Conversation

@sahar-fehri
Copy link
Copy Markdown
Contributor

@sahar-fehri sahar-fehri commented Jan 14, 2026

Do not merge before this gets in MetaMask/core#7413

Description

Performance Comparison: Per-Chain Token Cache Storage

This PR implements per-chain file storage for tokensChainsCache in TokenListController, replacing the single-file approach. Each chain's token list is now stored in a separate file via StorageService, reducing write amplification during incremental updates.


📊 Summary

Category This PR Main Branch Improvement
Cold restart (getAllPersistedState) 216.20ms 374.30ms 42% faster
Cold restart (cache load) ~310ms (parallel) Included in state -----
Onboarding - Token cache 4.40MB (StorageService) 4.40MB (in state) Stored separately
Onboarding - Background saves ~23MB each ~28MB each ~5MB less per save
Onboarding - Token cache in saves ❌ No ✅ Yes Eliminated
Add Monad 39KB (new chain only) ~4.4MB (full cache rewritten) Only new chain
Add Avalanche 157KB (new chain only) ~4.6MB (full cache rewritten) Only new chain
Background saves (idle) ~23MB ~28MB ~18% smaller
TokenListController in state 0.04KB 4,601KB Cache moved out

Key Results:

  1. Adding a single chain on main branch triggers a state save that rewrites all TokenListController cache (~4.6MB) plus all other controllers (~23MB) = ~28MB total.
  2. This PR writes ONLY the new chain (e.g., 39KB for Monad) to StorageService. The full token cache is NOT rewritten.
  3. Background saves are ~5MB smaller (~23MB vs ~28MB) because the token cache is stored separately.

🧪 Test Scenarios

Scenario 1: Cold Restart (Existing User)

Setup: Extension with 10 networks cached (8 popular + Monad + Avalanche), then browser restart.

This PR

Controller Storage:

[ControllerStorage PERF] getAllPersistedState complete - 216.20ms

StorageService - getAllKeys:

[StorageService PERF] getAllKeys TokenListController - 10 keys found - 277.60ms

StorageService - Per-chain getItem (parallel reads):

Chain Size Read Time
0x1 (Ethereum) 2022.39KB 80.40ms
0x38 (BSC) 1045.19KB 125.90ms
0x2105 (Base) 436.73KB 97.20ms
0x89 (Polygon) 388.91KB 128.30ms
0xa4b1 (Arbitrum) 345.79KB 159.50ms
0xa86a (Avalanche) 156.90KB 161.60ms
0xa (Optimism) 125.76KB 132.20ms
0xe708 (Linea) 40.13KB 163.20ms
0x8f (Monad) 39.15KB 131.80ms
0xaa36a7 (Sepolia) 0.04KB 162.70ms

Total cache size: ~4.60MB across 10 chains

Main Branch

Cold restart with 10 networks cached (8 popular + Monad + Avalanche):

[ControllerStorage PERF] getAllPersistedState started
[ControllerStorage PERF] getAllPersistedState complete - 374.30ms
[ControllerStorage PERF] TokenListController read - 4601.13KB - 374.30ms

Comparison

Metric This PR Main Branch Improvement
getAllPersistedState 216.20ms 374.30ms 42% faster
TokenListController in state 0.04KB 4,601KB Moved to StorageService
StorageService cache load ~163ms (10 chains parallel) N/A Separate loading
Total chains 10 10 Same
Total state size ~23MB ~28MB ~18% smaller

Key insight: The main state loads 158ms faster on this PR because it's ~5MB smaller. The token cache is loaded separately via StorageService in parallel during controller initialization.


Scenario 2: Fresh Onboarding

Setup: Fresh wallet creation, enable all popular networks, wait for token lists to fetch.

This PR

Initial state (fresh install):

[ControllerStorage PERF] getAllPersistedState complete - 13.70ms
[StorageService PERF] getAllKeys TokenListController - 0 keys found - 23.50ms

Per-chain writes as networks are enabled:

Chain Size Stringify Write Total
0xaa36a7 (Sepolia) 0.04KB 0.00ms 12.00ms 12.00ms
0xe708 (Linea) 40.13KB 0.00ms 81.70ms 81.70ms
0xa (Optimism) 125.76KB 0.20ms 81.20ms 81.40ms
0x2105 (Base) 436.73KB 0.80ms 79.10ms 79.90ms
0x89 (Polygon) 388.91KB 0.80ms 72.80ms 73.60ms
0xa4b1 (Arbitrum) 345.79KB 0.80ms 67.10ms 67.90ms
0x1 (Ethereum) 2022.39KB 4.20ms 68.40ms 72.60ms
0x38 (BSC) 1045.19KB 1.90ms 37.80ms 39.70ms

Summary:

  • Total data written: ~4.40MB (8 individual writes)
  • Number of writes: 8 (one per chain)
  • Total write time: ~509ms (sum of individual writes)

Main Branch

Initial state (fresh install):

[ControllerStorage PERF] getAllPersistedState complete - 14.60ms
[ControllerStorage PERF] set() - TokenListController size: 0.06KB
[ControllerStorage PERF] set() complete - 9952.04KB - 129.10ms

After clicking "All Popular Networks":

[ControllerStorage PERF] set() - TokenListController size: 4405.07KB
[ControllerStorage PERF] set() complete - 27830.24KB - 526.70ms

Summary:

  • TokenListController size: 4,405KB (~4.4MB) - cached in controller state
  • Total state written: 27,830KB (~27.2MB) - entire MetaMask state
  • Write time: 526.70ms

Comparison

Metric This PR Main Branch Difference
Token cache data 4.40MB 4.40MB Same amount
Token cache location StorageService (separate) Main state Separated
Background save size ~23MB ~28MB ~5MB smaller
Token cache in every save No Yes Eliminated

Key insight: Both branches have continuous background saves. On main branch, every save includes the ~4.4MB token cache. On this PR, the token cache is stored separately via StorageService, making each background save ~5MB smaller.


Scenario 3: Add New Chain

Setup: Existing wallet with cached networks, add a new network.

This PR

Avalanche (0xa86a):

[StorageService PERF] setItem TokenListController:tokensChainsCache:0xa86a - 156.90KB - stringify: 0.80ms, write: 137.20ms, total: 138.00ms

Monad (0x8f):

[StorageService PERF] setItem TokenListController:tokensChainsCache:0x8f - 39.15KB - stringify: 0.00ms, write: 2.40ms, total: 2.40ms

zkSync Era (0x144):

[StorageService PERF] setItem TokenListController:tokensChainsCache:0x144 - 12.98KB - stringify: 0.00ms, write: 0.90ms, total: 0.90ms

Polygon (0x89):

[StorageService PERF] setItem TokenListController:tokensChainsCache:0x89 - 388.91KB - stringify: 0.90ms, write: 15.40ms, total: 16.30ms

Main Branch

Adding Monad (0x8f) to existing cache:

[ControllerStorage PERF] set() - TokenListController size: 4444.22KB
[ControllerStorage PERF] set() complete - 27877.62KB - 569.00ms

Adding Avalanche (0xa86a) to existing cache:

[ControllerStorage PERF] set() - TokenListController size: 4601.13KB
[ControllerStorage PERF] set() complete - 28036.55KB - 559.30ms

Note: Each chain addition triggers a full state save that includes ALL TokenListController cache (~4.6MB) plus ALL other controllers (~23MB) = ~28MB total.

Comparison

Token cache write for new chain:

Chain This PR Main Branch Difference
Monad (39KB) 39KB to StorageService Full ~4.4MB cache rewritten Only new chain written
Avalanche (157KB) 157KB to StorageService Full ~4.6MB cache rewritten Only new chain written

Total state save triggered:

Metric This PR Main Branch Difference
State size ~23MB (no cache) ~28MB (with cache) ~5MB smaller
Token cache included ❌ No ✅ Yes Separated
New chain write 39-157KB (separate file) Included in 28MB Isolated

📋 Raw Logs

This PR - Cold Restart

[ControllerStorage PERF] getAllPersistedState started
[ControllerStorage PERF] getAllPersistedState complete - 216.20ms
[StorageService PERF] getAllKeys TokenListController - 10 keys found - 277.60ms
[StorageService PERF] getItem TokenListController:tokensChainsCache:0x1 - 2022.39KB - read: 80.40ms, total: 80.40ms
[StorageService PERF] getItem TokenListController:tokensChainsCache:0x2105 - 436.73KB - read: 97.20ms, total: 97.20ms
[StorageService PERF] getItem TokenListController:tokensChainsCache:0x38 - 1045.19KB - read: 125.80ms, total: 125.90ms
[StorageService PERF] getItem TokenListController:tokensChainsCache:0x89 - 388.91KB - read: 128.30ms, total: 128.30ms
[StorageService PERF] getItem TokenListController:tokensChainsCache:0x8f - 39.15KB - read: 131.80ms, total: 131.80ms
[StorageService PERF] getItem TokenListController:tokensChainsCache:0xa - 125.76KB - read: 132.20ms, total: 132.20ms
[StorageService PERF] getItem TokenListController:tokensChainsCache:0xa4b1 - 345.79KB - read: 159.50ms, total: 159.50ms
[StorageService PERF] getItem TokenListController:tokensChainsCache:0xa86a - 156.90KB - read: 161.60ms, total: 161.60ms
[StorageService PERF] getItem TokenListController:tokensChainsCache:0xaa36a7 - 0.04KB - read: 162.70ms, total: 162.70ms
[StorageService PERF] getItem TokenListController:tokensChainsCache:0xe708 - 40.13KB - read: 163.20ms, total: 163.20ms

This PR - Onboarding

[ControllerStorage PERF] getAllPersistedState started
[ControllerStorage PERF] getAllPersistedState complete - 13.70ms
[StorageService PERF] getAllKeys TokenListController - 0 keys found - 23.50ms
[StorageService PERF] setItem TokenListController:tokensChainsCache:0xaa36a7 - 0.04KB - stringify: 0.00ms, write: 12.00ms, total: 12.00ms
[StorageService PERF] setItem TokenListController:tokensChainsCache:0xe708 - 40.13KB - stringify: 0.00ms, write: 81.70ms, total: 81.70ms
[StorageService PERF] setItem TokenListController:tokensChainsCache:0xa - 125.76KB - stringify: 0.20ms, write: 81.20ms, total: 81.40ms
[StorageService PERF] setItem TokenListController:tokensChainsCache:0x2105 - 436.73KB - stringify: 0.80ms, write: 79.10ms, total: 79.90ms
[StorageService PERF] setItem TokenListController:tokensChainsCache:0x89 - 388.91KB - stringify: 0.80ms, write: 72.80ms, total: 73.60ms
[StorageService PERF] setItem TokenListController:tokensChainsCache:0xa4b1 - 345.79KB - stringify: 0.80ms, write: 67.10ms, total: 67.90ms
[StorageService PERF] setItem TokenListController:tokensChainsCache:0x1 - 2022.39KB - stringify: 4.20ms, write: 68.40ms, total: 72.60ms
[StorageService PERF] setItem TokenListController:tokensChainsCache:0x38 - 1045.19KB - stringify: 1.90ms, write: 37.80ms, total: 39.70ms

This PR - Add New Chain

# Adding Monad (39KB)
[StorageService PERF] setItem TokenListController:tokensChainsCache:0x8f - 39.15KB - stringify: 0.10ms, write: 1.60ms, total: 1.70ms
[ControllerStorage PERF] set() - TokenListController size: 0.04KB
[ControllerStorage PERF] set() complete - 23433.75KB - 418.90ms

# Adding Avalanche (157KB)
[StorageService PERF] setItem TokenListController:tokensChainsCache:0xa86a - 156.90KB - stringify: 0.50ms, write: 5.30ms, total: 5.80ms
[ControllerStorage PERF] set() - TokenListController size: 0.04KB
[ControllerStorage PERF] set() complete - 23435.80KB - 416.10ms

Main Branch - Cold Restart

[ControllerStorage PERF] getAllPersistedState started
[ControllerStorage PERF] getAllPersistedState complete - 374.30ms
[ControllerStorage PERF] TokenListController read - 4601.13KB - 374.30ms
[ControllerStorage PERF] set() - TokenListController size: 4601.13KB
[ControllerStorage PERF] set() complete - 28033.23KB - 426.60ms
[ControllerStorage PERF] set() - TokenListController size: 4601.13KB
[ControllerStorage PERF] set() complete - 28033.01KB - 564.00ms

Main Branch - Onboarding

[ControllerStorage PERF] getAllPersistedState started
[ControllerStorage PERF] getAllPersistedState complete - 14.60ms
[ControllerStorage PERF] set() complete - 0.06KB - 0.30ms
[ControllerStorage PERF] set() - TokenListController size: 0.06KB
[ControllerStorage PERF] set() complete - 9952.04KB - 129.10ms
[ControllerStorage PERF] set() - TokenListController size: 0.06KB
[ControllerStorage PERF] set() complete - 9952.30KB - 130.20ms
[ControllerStorage PERF] set() - TokenListController size: 0.06KB
[ControllerStorage PERF] set() complete - 9952.67KB - 136.10ms
[ControllerStorage PERF] set() - TokenListController size: 0.06KB
[ControllerStorage PERF] set() complete - 9952.97KB - 136.50ms
[ControllerStorage PERF] set() - TokenListController size: 0.06KB
[ControllerStorage PERF] set() complete - 9955.72KB - 142.20ms
[ControllerStorage PERF] set() - TokenListController size: 4405.07KB
[ControllerStorage PERF] set() complete - 27830.24KB - 526.70ms

Main Branch - Add New Chain (Monad + Avalanche)

# Adding Monad (39KB)
[ControllerStorage PERF] set() - TokenListController size: 4444.22KB
[ControllerStorage PERF] set() complete - 27877.62KB - 569.00ms

# Adding Avalanche (157KB)
[ControllerStorage PERF] set() - TokenListController size: 4601.13KB
[ControllerStorage PERF] set() complete - 28036.55KB - 559.30ms

🔧 How Performance Was Measured

Performance logging was added to:

  1. BrowserStorageAdapter (app/scripts/lib/stores/browser-storage-adapter.ts)

    • Logs for getItem, setItem, getAllKeys operations
    • Measures read time, stringify time, write time, and data size
  2. ExtensionStore (app/scripts/lib/stores/extension-store.ts)

    • Logs for getAllPersistedState and controller state writes
    • Measures TokenListController-specific read/write performance

To enable logging, set PERF_LOGGING_ENABLED = true in both files.


📝 Logging Code Reference (Main Branch)

The following code was added to extension-store.ts on main branch to capture performance metrics:

Helper Functions (add at top of file after imports)

// ============ PERF LOGGING (for testing) ============
const PERF_LOGGING_ENABLED = true;

function getSizeKB(obj: unknown): string {
  try {
    const str = JSON.stringify(obj);
    return (str.length / 1024).toFixed(2);
  } catch {
    return 'N/A';
  }
}

function logControllerReadPerf(
  controllerName: string,
  data: unknown,
  timeMs: number,
): void {
  if (!PERF_LOGGING_ENABLED) {
    return;
  }
  const sizeKB = getSizeKB(data);
  console.warn(
    `[ControllerStorage PERF] ${controllerName} read - ${sizeKB}KB - ${timeMs.toFixed(2)}ms`,
  );
}

function logControllerWritePerf(
  controllerName: string,
  data: unknown,
  timeMs: number,
): void {
  if (!PERF_LOGGING_ENABLED) {
    return;
  }
  const sizeKB = getSizeKB(data);
  console.warn(
    `[ControllerStorage PERF] ${controllerName} write - ${sizeKB}KB - ${timeMs.toFixed(2)}ms`,
  );
}
// ============ END PERF LOGGING ============

In get() method - Add at start of method:

const perfStart = performance.now();
if (PERF_LOGGING_ENABLED) {
  console.warn('[ControllerStorage PERF] getAllPersistedState started');
}

In get() method - Add after data is loaded:

// PERF: Log overall time and TokenListController size
if (PERF_LOGGING_ENABLED) {
  const elapsed = performance.now() - perfStart;
  console.warn(
    `[ControllerStorage PERF] getAllPersistedState complete - ${elapsed.toFixed(2)}ms`,
  );
  // Log TokenListController state size specifically
  if (data.TokenListController) {
    logControllerReadPerf(
      'TokenListController',
      data.TokenListController,
      elapsed,
    );
  }
}

In set() method - Add logging:

const perfStart = performance.now();

// PERF: Log TokenListController size before write
if (
  PERF_LOGGING_ENABLED &&
  isObject(data) &&
  hasProperty(data, 'TokenListController')
) {
  const tlcSize = getSizeKB(data.TokenListController);
  console.warn(
    `[ControllerStorage PERF] set() - TokenListController size: ${tlcSize}KB`,
  );
}

// ... existing set logic ...

// PERF: Log total write time (add after await local.set())
if (PERF_LOGGING_ENABLED) {
  const elapsed = performance.now() - perfStart;
  const totalSize = getSizeKB({ data, meta });
  console.warn(
    `[ControllerStorage PERF] set() complete - ${totalSize}KB - ${elapsed.toFixed(2)}ms`,
  );
}

Expected Log Output

Cold Restart:

[ControllerStorage PERF] getAllPersistedState started
[ControllerStorage PERF] getAllPersistedState complete - 374.30ms
[ControllerStorage PERF] TokenListController read - 4601.13KB - 374.30ms

Write (adding chain or background save):

[ControllerStorage PERF] set() - TokenListController size: 4601.13KB
[ControllerStorage PERF] set() complete - 28036.55KB - 559.30ms

💡 Key Takeaways

  1. Write amplification eliminated: Adding a single chain now writes only that chain's data (~30-200KB) instead of the entire cache (~4MB)

  2. Faster incremental updates: Per-chain writes are significantly faster than full cache rewrites

  3. Cold restart trade-off: Parallel file reads + getAllKeys adds some overhead vs single file read, but the difference is minimal

  4. Onboarding improvement: Total data written during onboarding is reduced by avoiding cumulative rewrites


✅ PR Branch: Background Writes No Longer Include Token Cache

On this PR branch, background writes show:

[ControllerStorage PERF] set() - TokenListController size: 0.04KB    ← TINY! No cache!
[ControllerStorage PERF] set() complete - 23425.30KB - 481.60ms      ← ~23MB (not 28MB)

Key proof: TokenListController is only 0.04KB in the main state because the ~4.4MB token cache is stored separately in StorageService.


⚠️ Main Branch: Continuous Background Write Amplification

During testing on main branch, we observed that the entire 27.8MB state is being rewritten repeatedly even when the user is idle:

[ControllerStorage PERF] set() - TokenListController size: 4444.22KB
[ControllerStorage PERF] set() complete - 27877.62KB - 632.30ms
[ControllerStorage PERF] set() - TokenListController size: 4444.22KB
[ControllerStorage PERF] set() complete - 27877.62KB - 456.40ms
[ControllerStorage PERF] set() - TokenListController size: 4444.22KB
[ControllerStorage PERF] set() complete - 27877.62KB - 606.40ms
[ControllerStorage PERF] set() - TokenListController size: 4444.22KB
[ControllerStorage PERF] set() complete - 27877.59KB - 625.10ms
[ControllerStorage PERF] set() - TokenListController size: 4444.22KB
[ControllerStorage PERF] set() complete - 27877.59KB - 597.90ms

Why This Happens

MetaMask has background processes that trigger state saves:

  • Token balance polling
  • Price updates
  • Network status checks
  • Account sync
  • DeFi positions updates
  • etc.

Each time ANY controller state changes, the entire state (~27.8MB) is serialized and written to storage, including the 4.4MB TokenListController cache that hasn't changed.

Impact Comparison

Metric This PR Main Branch
State size per write ~23MB ~28MB
TokenListController in state 0.04KB 4,601KB
Token cache included in saves ❌ No ✅ Yes (every save)
Write time ~480ms ~550ms

How This PR Helps

By moving tokensChainsCache to StorageService:

  1. Background saves are ~18% smaller (~23MB instead of ~28MB)
  2. Token cache only written when it actually changes (new chain added or cache refresh)
  3. Reduced disk I/O - ~5MB less data serialized and written on every background save
  4. Better SSD/storage health - less unnecessary write cycles

Changelog

CHANGELOG entry: No user facing changes; this only updates the storage location for tokenListController.

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

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
Medium risk because it changes how TokenListController persists cached token lists and adds a state migration writing to browser.storage.local, which could impact startup/migration behavior if keys or storage operations fail.

Overview
Moves TokenListController token list caching to StorageService. The controller messenger now allows StorageService:* actions and TokenListControllerInit fires controller.initialize() on startup to load cached lists from storage (logging errors but not failing init).

Adds migration #190 to preserve existing caches. Migration 190 copies tokensChainsCache entries into per-chain storageService:TokenListController:tokensChainsCache:{chainId} keys without overwriting existing entries, then clears the in-state cache and bumps fixtures/snapshots to version 190.

Updates tests and deps for the new storage behavior. Jest mocks for webextension-polyfill are made async/shared across imports, e2e state persistence ignores StorageService-prefixed keys, and @metamask/assets-controllers is bumped to ^98.0.0.

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

@github-actions
Copy link
Copy Markdown
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.

@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Jan 14, 2026

Builds ready [13dcdbf]
📊 Page Load Benchmark Results

Current Commit: 13dcdbf | Date: 1/14/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 998ms (±72ms) 🟢 | historical mean value: 1.02s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 695ms (±69ms) 🟢 | historical mean value: 709ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 76ms (±10ms) 🟢 | historical mean value: 76ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 998ms 72ms 949ms 1.28s 1.23s 1.28s
domContentLoaded 695ms 69ms 657ms 970ms 913ms 970ms
firstPaint 76ms 10ms 60ms 164ms 84ms 164ms
firstContentfulPaint 76ms 10ms 60ms 164ms 84ms 164ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 1.79 KiB (0.04%)
  • ui: 237 Bytes (0%)
  • common: 10.97 KiB (0.12%)

package.json Outdated
"yarn-binary:hydrate": "corepack hydrate .yarn/yarn-corepack.tgz --activate"
},
"resolutions": {
"@metamask/assets-controllers@^95.1.0": "npm:@metamask-previews/assets-controllers@95.1.0-preview-009e026d",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Should be updated once core is released

@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Jan 15, 2026

Builds ready [a06c10a]
📊 Page Load Benchmark Results

Current Commit: a06c10a | Date: 1/15/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±73ms) 🟡 | historical mean value: 1.04s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 734ms (±70ms) 🟢 | historical mean value: 721ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 76ms (±10ms) 🟢 | historical mean value: 77ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 73ms 1.01s 1.34s 1.27s 1.34s
domContentLoaded 734ms 70ms 698ms 1.01s 948ms 1.01s
firstPaint 76ms 10ms 60ms 156ms 84ms 156ms
firstContentfulPaint 76ms 10ms 60ms 156ms 84ms 156ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 1.47 KiB (0.03%)
  • ui: 7 Bytes (0%)
  • common: 10.78 KiB (0.12%)

@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Jan 15, 2026

Builds ready [a06c10a]
📊 Page Load Benchmark Results

Current Commit: a06c10a | Date: 1/15/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±73ms) 🟡 | historical mean value: 1.03s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 734ms (±70ms) 🟢 | historical mean value: 719ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 76ms (±10ms) 🟢 | historical mean value: 77ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 73ms 1.01s 1.34s 1.27s 1.34s
domContentLoaded 734ms 70ms 698ms 1.01s 948ms 1.01s
firstPaint 76ms 10ms 60ms 156ms 84ms 156ms
firstContentfulPaint 76ms 10ms 60ms 156ms 84ms 156ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 1.47 KiB (0.03%)
  • ui: 7 Bytes (0%)
  • common: 10.78 KiB (0.12%)

@socket-security
Copy link
Copy Markdown

socket-security bot commented Jan 15, 2026

All alerts resolved. Learn more about Socket for GitHub.

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report

@github-actions github-actions bot removed the size-M label Jan 15, 2026
@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Jan 28, 2026

Builds ready [855d67d]
UI Startup Metrics (1315 ± 119 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--13151049170811913891507
load--1129888150111511991325
domContentLoaded--1121884149511411861309
domInteractive--2917120212486
firstPaint--191651180178201316
backgroundConnect--23621830912240259
firstReactRender--17113751927
initialActions--106113
loadScripts--90067012701149641093
setupStore--1263851523
numNetworkReqs--211574161571
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--18971595288017420182128
load--1050937179913310431366
domContentLoaded--1036933179113310301353
domInteractive--34191332433105
firstPaint--1607149880209312
backgroundConnect--32128044934340402
firstReactRender--23154662634
initialActions--103112
loadScripts--80269815261257971100
setupStore--1675471830
numNetworkReqs--1235325855152249
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--819656103088878975
load--68658885572756813
domContentLoaded--68158384871751808
domInteractive--241691182079
firstPaint--1016071372116193
backgroundConnect--39181762841104
firstReactRender--15103551630
initialActions--104111
loadScripts--67858183871748806
setupStore--1063641119
numNetworkReqs--221584181575
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--1265846241926514311741
load--70561413641206871024
domContentLoaded--69560713521206801020
domInteractive--37161833334131
firstPaint--1376658191144272
backgroundConnect--16613236556161327
firstReactRender--22183832230
initialActions--102111
loadScripts--69360513431186781013
setupStore--1141731316
numNetworkReqs--1334727560158253
19--------
FirefoxBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--14241170203415815161708
load--1167993174412512311386
domContentLoaded--1166993174412512311386
domInteractive--793623547103163
firstPaint--------
backgroundConnect--68252744895163
firstReactRender--1393541319
initialActions--103122
loadScripts--1127979156810511881336
setupStore--154162211146
numNetworkReqs--231285191980
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--27931894981891928104228
load--13121082265831212572108
domContentLoaded--13121082265131212572108
domInteractive--127381477161114337
firstPaint--------
backgroundConnect--3081081458264321968
firstReactRender--23157482331
initialActions--203123
loadScripts--12481061263226212211767
setupStore--1668796220187668
numNetworkReqs--71382154682201
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--16641373240518917692013
load--14081185176011815041641
domContentLoaded--14081184176011815041641
domInteractive--903022940125147
firstPaint--------
backgroundConnect--732129651118174
firstReactRender--14106251421
initialActions--102112
loadScripts--13681169173710114271543
setupStore--1842633411104
numNetworkReqs--231294181876
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--29602133445058732064225
load--16301199268240917732578
domContentLoaded--16301194268240917722578
domInteractive--11229609110111399
firstPaint--------
backgroundConnect--3081171359263330954
firstReactRender--21166262429
initialActions--217122
loadScripts--15831183265937817492530
setupStore--1859784234352758
numNetworkReqs--69361844193175
19--------
📊 Page Load Benchmark Results

Current Commit: 855d67d | Date: 1/28/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±38ms) 🟡 | historical mean value: 1.03s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 724ms (±36ms) 🟢 | historical mean value: 720ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 76ms (±9ms) 🟢 | historical mean value: 76ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 38ms 1.01s 1.33s 1.06s 1.33s
domContentLoaded 724ms 36ms 704ms 1.01s 740ms 1.01s
firstPaint 76ms 9ms 64ms 152ms 84ms 152ms
firstContentfulPaint 76ms 9ms 64ms 152ms 84ms 152ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 1.56 KiB (0.03%)
  • ui: 2.16 KiB (0.03%)
  • common: 4.27 KiB (0.05%)

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 [432378c]
UI Startup Metrics (1346 ± 136 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--13461056163113614301596
load--1144879142913312361388
domContentLoaded--1137874142313212311382
domInteractive--2715115202382
firstPaint--168611124121210297
backgroundConnect--23120032319240273
firstReactRender--19114572235
initialActions--109113
loadScripts--922681122513110091167
setupStore--1473861727
numNetworkReqs--221579181574
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--21241481479659620944259
load--1115970176016111281523
domContentLoaded--1100958175116111111509
domInteractive--39192273437117
firstPaint--2417017633142371476
backgroundConnect--42928327364153571379
firstReactRender--24166782546
initialActions--1012112
loadScripts--85473114111468611240
setupStore--1664461824
numNetworkReqs--1215125451140240
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--84566811591079091049
load--704595103995768885
domContentLoaded--698591103194764878
domInteractive--2616101192384
firstPaint--1086133754128212
backgroundConnect--3818142254198
firstReactRender--1693461930
initialActions--104112
loadScripts--696589102993762876
setupStore--1263151223
numNetworkReqs--221585191579
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--1238850179624714461734
load--70161211501166941023
domContentLoaded--69260811391166821016
domInteractive--35171482735110
firstPaint--15259971129174501
backgroundConnect--15513134638154252
firstReactRender--22173132428
initialActions--102011
loadScripts--68960611291146801008
setupStore--1252941418
numNetworkReqs--1274927059155257
19--------
FirefoxBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--14921161205819215791932
load--1202987176514812901440
domContentLoaded--1201987176514812901440
domInteractive--74332114495165
firstPaint--------
backgroundConnect--712626353106184
firstReactRender--15105481540
initialActions--104123
loadScripts--1163969173813512251367
setupStore--2152444210114
numNetworkReqs--241287191880
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--29492104827886529914099
load--13651124250327114772078
domContentLoaded--13641124250227114762077
domInteractive--13836589107148375
firstPaint--------
backgroundConnect--48713722823787411174
firstReactRender--21157462329
initialActions--2115122
loadScripts--12891079236622513211764
setupStore--13812761176135580
numNetworkReqs--79352204492185
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--15871281220516717031873
load--13521142164811414501565
domContentLoaded--13521142164811414501564
domInteractive--783223138100140
firstPaint--------
backgroundConnect--66242394376161
firstReactRender--14104641419
initialActions--102122
loadScripts--13181126157510314001496
setupStore--175210311259
numNetworkReqs--231290191879
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--28432064421747330373911
load--15171233265030816192347
domContentLoaded--15171233265030816192347
domInteractive--11830591115112444
firstPaint--------
backgroundConnect--3591071302267472890
firstReactRender--22156182434
initialActions--203122
loadScripts--14721213260529215592229
setupStore--1858768224343728
numNetworkReqs--76372764688177
19--------
📊 Page Load Benchmark Results

Current Commit: 432378c | Date: 1/29/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±65ms) 🟡 | historical mean value: 1.04s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 735ms (±62ms) 🟢 | historical mean value: 724ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 78ms (±15ms) 🟢 | historical mean value: 77ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 65ms 1.01s 1.35s 1.27s 1.35s
domContentLoaded 735ms 62ms 700ms 1.01s 949ms 1.01s
firstPaint 78ms 15ms 64ms 212ms 88ms 212ms
firstContentfulPaint 78ms 15ms 64ms 212ms 88ms 212ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 1.51 KiB (0.03%)
  • ui: 3 Bytes (0%)
  • common: 3.72 KiB (0.04%)

@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Jan 29, 2026

Builds ready [62be895]
UI Startup Metrics (1300 ± 113 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--13001096159411313761518
load--1117895137110911911308
domContentLoaded--1111893136310911841304
domInteractive--2716100182473
firstPaint--170661195154194320
backgroundConnect--23121327712236260
firstReactRender--17104151927
initialActions--105113
loadScripts--89468211461089661081
setupStore--1262851523
numNetworkReqs--221583171575
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--24031550567395224024663
load--1122957184914911691452
domContentLoaded--1107946183714811581446
domInteractive--38191622936122
firstPaint--203771174129251375
backgroundConnect--56428629485504731975
firstReactRender--25165672841
initialActions--109113
loadScripts--86372014471299001189
setupStore--1655081931
numNetworkReqs--1335725752164241
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--83466911721029111003
load--68859695185759872
domContentLoaded--68359394584748866
domInteractive--241694162173
firstPaint--1026030447138182
backgroundConnect--3918122224299
firstReactRender--15103251827
initialActions--104112
loadScripts--68059094383745864
setupStore--1264461223
numNetworkReqs--221584191579
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--1283882267430314751787
load--70660813261226961014
domContentLoaded--69660113201236821007
domInteractive--38182013336119
firstPaint--1406548595155419
backgroundConnect--15613134145154290
firstReactRender--22163432328
initialActions--102111
loadScripts--6935991312121680997
setupStore--1142041418
numNetworkReqs--1445632456169265
19--------
FirefoxBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--14411122198817715401788
load--1175945177513912501457
domContentLoaded--1174945177414012491457
domInteractive--913551371125212
firstPaint--------
backgroundConnect--71252985899200
firstReactRender--1397381216
initialActions--103122
loadScripts--1130930174812111991295
setupStore--145218231244
numNetworkReqs--231287191977
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--300219139599129329726677
load--13511103241428014762021
domContentLoaded--13511103241428014762020
domInteractive--157411315157145448
firstPaint--------
backgroundConnect--46111753426685031627
firstReactRender--22157492433
initialActions--208123
loadScripts--12651072239022813021792
setupStore--155141099210132639
numNetworkReqs--87392534794210
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--16811335273020718072042
load--14361152193214115271662
domContentLoaded--14351146193114115271662
domInteractive--902923146128181
firstPaint--------
backgroundConnect--832920445126171
firstReactRender--13112021418
initialActions--103112
loadScripts--13851136182611614651594
setupStore--134137181136
numNetworkReqs--231289181980
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--30012211934076630683916
load--16221265764968415902346
domContentLoaded--16221265764968415902345
domInteractive--168411330198170706
firstPaint--------
backgroundConnect--3451211078230396878
firstReactRender--22166272531
initialActions--203123
loadScripts--15821251760468315552189
setupStore--15812783193174623
numNetworkReqs--85372615093212
19--------
📊 Page Load Benchmark Results

Current Commit: 62be895 | Date: 1/29/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±36ms) 🟡 | historical mean value: 1.04s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 734ms (±33ms) 🟢 | historical mean value: 724ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 79ms (±11ms) 🟢 | historical mean value: 77ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 36ms 1.03s 1.32s 1.08s 1.32s
domContentLoaded 734ms 33ms 712ms 980ms 764ms 980ms
firstPaint 79ms 11ms 64ms 176ms 88ms 176ms
firstContentfulPaint 79ms 11ms 64ms 176ms 88ms 176ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 1.51 KiB (0.03%)
  • ui: 3 Bytes (0%)
  • common: 3.72 KiB (0.04%)

Copy link
Copy Markdown
Member

@juanmigdr juanmigdr left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

Copy link
Copy Markdown
Contributor

@chloeYue chloeYue left a comment

Choose a reason for hiding this comment

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

e2e changes LGTM

@sahar-fehri sahar-fehri added this pull request to the merge queue Jan 29, 2026
Merged via the queue into main with commit b6ae63c Jan 29, 2026
335 of 339 checks passed
@sahar-fehri sahar-fehri deleted the chore/integrate-storage-service-with-tokenListController branch January 29, 2026 16:24
@github-actions github-actions bot locked and limited conversation to collaborators Jan 29, 2026
@metamaskbot metamaskbot added the release-13.17.0 Issue or pull request that will be included in release 13.17.0 label Jan 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-13.17.0 Issue or pull request that will be included in release 13.17.0 size-L team-assets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants