Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: strip ZLS WASM binary to reduce total page size #4

Open
ianprime0509 opened this issue Aug 24, 2023 · 0 comments
Open

Suggestion: strip ZLS WASM binary to reduce total page size #4

ianprime0509 opened this issue Aug 24, 2023 · 0 comments

Comments

@ianprime0509
Copy link
Sponsor Contributor

Something I realized while playing around with this project is that the ZLS WASM binary is currently the largest part of the total content transferred over the network (it's 11.22MB with the version of the page currently deployed, and with the latest Zig it's closer to 12MB). For comparison, the latest Zig master (with the appropriate patch) compiled to WASM using ReleaseSmall is 5.3MB.

Attempting to compile ZLS to WASM using ReleaseSmall unfortunately does not work due to ziglang/zig#15469 (the reproducer I provided in the comments of that issue was reduced from ZLS). However, using wasm-strip from https://github.com/WebAssembly/wabt, it is possible to bring the 12MB ReleaseFast build of ZLS down to 2.2MB (just by removing all the custom sections).

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

No branches or pull requests

1 participant