Skip to content

perf(sift): exclude inlined WASM from renderer plugin (7.4 MB -> 382 kB)#2136

Merged
rgbkrk merged 1 commit into
mainfrom
kyle/sift-exclude-inline-wasm
Apr 24, 2026
Merged

perf(sift): exclude inlined WASM from renderer plugin (7.4 MB -> 382 kB)#2136
rgbkrk merged 1 commit into
mainfrom
kyle/sift-exclude-inline-wasm

Conversation

@rgbkrk
Copy link
Copy Markdown
Member

@rgbkrk rgbkrk commented Apr 24, 2026

Summary

  • The wasm-bindgen glue contains new URL('sift_wasm_bg.wasm', import.meta.url) which Vite base64-inlines into the CJS bundle. The 5.2 MB WASM binary expands to 6.9 MB of base64, making the sift.js plugin 7.4 MB.
  • The sift renderer already loads WASM from the blob server via setWasmUrl(), so the inline copy was never used.
  • A build plugin rewrites the URL reference to a dummy string, preventing the inline. sift.js drops from 7.4 MB to 382 kB.

Test plan

  • 137 sift unit tests pass
  • Lint clean
  • Manual: open a notebook with parquet output, verify sift table renders (WASM loads from blob server as before)

🪶 Generated with Quill Agent

…-> 382 kB)

The wasm-bindgen glue contains new URL('sift_wasm_bg.wasm', import.meta.url)
which Vite base64-inlines into the JS bundle. The sift renderer already
loads the WASM from the blob server via setWasmUrl(), so the 6.9 MB
inline copy was never used. A build plugin now rewrites the URL reference
to prevent the inline.
@github-actions github-actions Bot added the frontend Webview, React, TypeScript UI label Apr 24, 2026
@rgbkrk rgbkrk merged commit 15374c0 into main Apr 24, 2026
34 of 35 checks passed
@rgbkrk rgbkrk deleted the kyle/sift-exclude-inline-wasm branch April 24, 2026 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend Webview, React, TypeScript UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant