Repository navigation
[SeerrNG #746] perf(lumen): split pages into chunks, ask the first questions early, faster Requests - #38
Open
ncbudd wants to merge 1 commit into
Open
[SeerrNG #746] perf(lumen): split pages into chunks, ask the first questions early, faster Requests#38ncbudd wants to merge 1 commit into
ncbudd wants to merge 1 commit into
Conversation
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.
Mirror of snapetech-org/seerrng#746. The
lumen/tree is identical to that PR's branch. Review and discussion happen upstream; this closes once upstream merges and the sync picks it up.Builds on #745 (branch
pr/lumen-phone-layout).Summary
Lumen loaded as one 1.7 MB script and asked its first API questions only after that script had run. This PR makes the first screen arrive sooner and the Requests page ask fewer, earlier questions.
Loading
React.lazy) behind a page-shaped skeleton, and the open page's chunk starts downloading with the shell. React and the router get a long-cached vendor chunk. Albums on the Search page load the Music chunk only when one is shown.scripts/trim-english-catalog.mjs) ships only the English entries that the inlinet()defaults can't stand in for. The English catalog went from 455 kB to 212 kB raw.public/lumen-boot.js): while the bundle downloads, a 1.5 kB boot script asks for the session, public settings, the Lumen config and the account's settings. The app takes each answer once (takeEarlyAnswer), and an early answer lost on the network is simply asked again.apiCache.sharedlets the menu and the page share one in-flight request, so the pending request count and the account settings are read once.Requests
Fixed on the way
Testing
loading-speed.spec.ts: the first questions start before the app loads and are each asked once; a title page reuses the account settings the menu just read; a page still downloading shows its skeleton, then the page; Requests asks for the small pages of its first screen together; My requests shows its newest page before the rest of the history; a quick return to Requests shows the last list at once; Search opened from a link keeps the phone tabs until the box is tapped;trim-english-catalog.test.mjs: the plugin drops only entries that every use already spells out in English;request-status.spec.tsnow expects the first 20 lifecycle rows as two small pages asked for together, andservice-note-heading-localization.spec.tstells the comics capability probe apart from the catalog search.00b4b12d1), with #745 below it:tsc, build and unit tests (91): pass;pnpm i18n:checkand ESLint on the changed Lumen files: pass;app,loading-speed,request-status,service-note-heading-localization,mobile-navigation,request-entry-navigation,review-core,review-pages,search-localization,account-settings,admin-navigation,lumen-preferences,themeanduser-route-compat. 1,459 passed, 32 failed, none of them new with this PR:review-coretests on every size, and "series watch rule", "Classic comic discovery bookmarks" and "Music album and artist details localize" (see #745);AI assistance
AI tools helped write parts of the code and tests. I reviewed the changes, ran the tests listed above, and checked it on a live install.