Skip to content

perf(docs): preload WASM module in background on site visit#26

Merged
pratyush618 merged 1 commit intomasterfrom
perf/wasm-preload
Mar 30, 2026
Merged

perf(docs): preload WASM module in background on site visit#26
pratyush618 merged 1 commit intomasterfrom
perf/wasm-preload

Conversation

@pratyush618
Copy link
Copy Markdown
Collaborator

Summary

  • WASM module now loads in the background via requestIdleCallback as soon as the user visits any page on the docs site
  • By the time they navigate to the playground, the module is already cached — no spinner, instant interaction
  • Uses Docusaurus clientModules to trigger the preload, and a shared cache consumed by useReclink

Test plan

  • Visit any docs page, check Network tab — WASM files fetched during idle time
  • Navigate to playground — should load instantly with no spinner
  • Hard refresh on a playground page — still works (falls back to on-demand loading)

Uses Docusaurus clientModules to trigger WASM loading during browser
idle time. By the time a user navigates to the playground, the module
is already cached — no spinner, instant interaction.
@pratyush618 pratyush618 merged commit 1b64e94 into master Mar 30, 2026
12 checks passed
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.

1 participant