Repository navigation
perf(web): trim non-crypto weight and boot requests from the entry chunk - #14667
Merged
Merged
Conversation
Only createOptimizelyClient needs it, so import it there and drop it from the entry chunk. common's import becomes type-only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The popover pulls in the drag-and-drop library and only renders after the queue button is clicked. Load it on first open, prefetching on hover. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The desktop panel now mounts on first hover or open of the bell, which also kicks off the notifications fetch. The mobile-web notification page becomes a lazy route like its neighbours. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
WebPlayer only needs the enum, but importing it from the mobile settings page pulled the whole page into the entry chunk. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Search history and library filters are tiny, so localStorage is enough. Existing values are copied from localforage on first read of each key; localforage is only imported for that one-time copy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both are only needed during uploads, but were evaluated at startup on web and mobile. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
StorageNodeSelector hit /health_check in its constructor, so every app boot made the request even though only uploads use the result. Fetch it the first time a node is selected, sharing one request across concurrent callers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Trending fired week, month, all-time and underground queries on load while showing one of them. Fetch the visible lineup, and start the others when their filter is hovered (desktop) or pressed (mobile web) so switching stays quick. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Convert the non-crypto NiceModal registrations (share, add to collection, confirmations, contest, welcome, chat blast, etc.) to registerLazyModal so none of them load until opened. Registration moves out of the modal modules so the lazy import can't re-register an open modal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Web's svgr had no svgo pass, so icons shipped as raw Figma exports. Use the same preset mobile runs on these files, keeping viewBox, ids and colors as they are and skipping the lossy curve and transform rewrites. Sources shrink from 794 KB to 546 KB; a pixel diff of all 279 SVGs at 8x shows only sub-pixel edge changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The first API fetches and the Optimizely datafile script both wait on a fresh connection. The API link is crossorigin because fetch uses CORS. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
React, react-dom, react-router, redux, react-redux, redux-saga and query-core change rarely, so a separate chunk stays cached across deploys. The chunk has no imports of its own and is modulepreloaded from index.html. SSR keeps its default chunking. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 7b0022e The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The non-crypto half of the web bundle audit. The crypto half is #14660–#14664.
Impact (web entry chunk, prod build)
Changes (one commit each)
@optimizely/optimizely-sdkloads insidecreateOptimizelyClient(~357 KB raw).SubPageenum moved tosettings-page/types.ts.WebPlayerimported it from the mobileSettingsPageand dragged in the whole page (~78 KB raw).getSelectedNode()instead of in the constructor. That's one fewer request on every web and mobile boot. Concurrent callers share the request, and a failed request is retried.registerLazyModal, appended as a separate block. Expect a small conflict with perf: load Solana, wallet and purchase code on demand #14664 inregisterNiceModals.ts: drop the side-effect imports and keep both lazy blocks.viewBoxand geometry. The icon SVGs in the entry go from about 385 to 247 KB. Pixel-diffing all 279 SVGs at 8x showed only sub-pixel edge changes. Looser settings visibly moved logos with embedded images, so they're off.Test plan
/health_checkon load; only the week trending request on load.?openNotifications), the mobile-web notifications page, mobile-web settings sub-pages🤖 Generated with Claude Code