perf: preload all route chunks on app load#185
Merged
AugustoL merged 1 commit intoopenscan-explorer:devfrom Jan 29, 2026
Merged
perf: preload all route chunks on app load#185AugustoL merged 1 commit intoopenscan-explorer:devfrom
AugustoL merged 1 commit intoopenscan-explorer:devfrom
Conversation
Add eager preloading of all lazy-loaded route chunks to eliminate navigation delay caused by on-demand chunk downloading.
|
🚀 Preview: https://pr-185--openscan.netlify.app |
MatiasOS
approved these changes
Jan 29, 2026
Merged
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.
Description
Add eager preloading of all lazy-loaded route chunks to eliminate navigation delay caused by on-demand chunk downloading.
How It Improves Loading Time
Before (On-Demand Loading)
Each navigation to a new page required downloading the JavaScript chunk for that route on-demand, causing a visible delay while the user waits.
After (Eager Preloading)
Once the app is fully loaded, all 18 route chunks are preloaded in the background. When the user navigates, the chunk is already in the browser cache, eliminating the download delay.
Loading Workflow Change
Previous Workflow
/blocksblocks-[hash].jschunkNew Workflow
fullyReady = true)preloadAllRoutes()triggers download of all 18 page chunks/blocksTrade-offs
The trade-off is slightly higher initial bandwidth usage in exchange for instant navigation throughout the app.
Related Issue
N/A - Performance optimization
Type of Change
Changes Made
src/components/LazyComponents.tsx: AddedpreloadAllRoutes()function that imports all 18 page chunkssrc/App.tsx: CallpreloadAllRoutes()when app is fully readyChecklist
npm run format:fixandnpm run lint:fixnpm run typecheckwith no errorsnpm run test:runAdditional Notes
fullyReady = true), so it doesn't compete with initial page load