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

Keep opt-level = s and remove console_error_panic_hook #48

Merged
merged 2 commits into from
Mar 16, 2022
Merged

Conversation

kylebarron
Copy link
Owner

@kylebarron kylebarron commented Mar 16, 2022

Saves 331KB on the uncompressed default wasm bundle.

Although this actually makes the brotli-compressed wasm bundle 1kb larger!! Though the gzip-compressed wasm bundle is still 60kb smaller.

Brotli encoded wasm sizes (with arrow1):

  • opt-level = s with console_error_panic_hook: 855246
  • opt-level = s without console_error_panic_hook: 824049
  • opt-level = z with console_error_panic_hook: 856203
  • opt-level = z without console_error_panic_hook: 855934

So let's go with opt-level = s and without console_error_panic_hook as the default

Closes #45

@kylebarron kylebarron changed the title Use opt-level = z Keep opt-level = s and remove console_error_panic_hook Mar 16, 2022
@kylebarron kylebarron merged commit f40e8e7 into main Mar 16, 2022
@kylebarron kylebarron deleted the size-opt branch March 16, 2022 02:33
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.

Explore documentation on shrinking wasm code size
1 participant