Skip to content

perf: code-split heavy routes and lazy-load ZK prover - #407

Merged
Mikey-222 merged 1 commit into
Hel-Phone:mainfrom
Bobai100:feat/code-splitting-lazy-loading
Aug 28, 2026
Merged

perf: code-split heavy routes and lazy-load ZK prover#407
Mikey-222 merged 1 commit into
Hel-Phone:mainfrom
Bobai100:feat/code-splitting-lazy-loading

Conversation

@Bobai100

Copy link
Copy Markdown
  • Wrap /help and /ranking routes in React.lazy + Suspense so Mapbox GL and the Stellar/ ZK stack are only fetched when those routes are visited, cutting the initial bundle from ~11MB to ~40KB of route code.
  • Load the ZK prover module (Noir + Barretenberg WASM, ~7MB) dynamically in Help.tsx only when a proof is actually requested, keeping the heavy WASM out of the route chunk until proof generation begins.
  • Split Vite vendor chunks into react-vendor, stellar, supabase, buffer, zk, mapbox and a shared vendor chunk for better caching and parallelism.

closes #55

- Wrap /help and /ranking routes in React.lazy + Suspense so Mapbox GL
  and the Stellar/ ZK stack are only fetched when those routes are visited,
  cutting the initial bundle from ~11MB to ~40KB of route code.
- Load the ZK prover module (Noir + Barretenberg WASM, ~7MB) dynamically in
  Help.tsx only when a proof is actually requested, keeping the heavy WASM
  out of the route chunk until proof generation begins.
- Split Vite vendor chunks into react-vendor, stellar, supabase, buffer,
  zk, mapbox and a shared vendor chunk for better caching and parallelism.
@drips-wave

drips-wave Bot commented Aug 28, 2026

Copy link
Copy Markdown

@Bobai100 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Mikey-222
Mikey-222 merged commit 6ef4bd4 into Hel-Phone:main Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement code splitting and lazy loading

2 participants