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

[FEATURE REQUEST] Precompress web server wasm also in other formats #986

Open
jasyip opened this issue Oct 6, 2024 · 0 comments
Open

[FEATURE REQUEST] Precompress web server wasm also in other formats #986

jasyip opened this issue Oct 6, 2024 · 0 comments
Labels
docker enhancement New feature or request frontend Issues that require a frontend change help wanted Extra attention is needed

Comments

@jasyip
Copy link

jasyip commented Oct 6, 2024

Motivation
Why do you want the feature? What problem do you have, what use cases would it enable?

Currently, the web server wasm is precompressed in gzip and served if the HTTP client accepts the gzip encoding. However, most web browsers with their most recent updates usually support other encoding schemes such as brotli and zstd, so if the wasm is precompressed with gzip, why not some of the others? zstd can achieve better compression ratios with similar or better decompression speed than gzip. brotli achieves even better compression ratios with much slower decompression speed than gzip/zstd.

Describe the solution you'd like
A clear and concise description of what you want to happen.

I think that given the superiority of zstd over gzip, the web server should support serving the wasm file pre-compressed with zstd if the HTTP client accepts zstd encoding. Given that making many precompressions of different schemes can bloat the Docker image, I am not opposed to excluding brotli precompression given its slower compression/decompression speeds if that is a concern.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered. You can include workarounds that are currently possible.

I have a custom lldap Docker image and here are the sizes of its wasm file with the precompressions:

  • Uncompressed: 2106301
  • gzip (pigz -9k): 722132
  • zstd (zstdmt -19): 562137
  • brotli (brotli -Z): 513328

Additional context
Add any other context or screenshots about the feature request here.

N/A

@jasyip jasyip added the enhancement New feature or request label Oct 6, 2024
@nitnelave nitnelave added help wanted Extra attention is needed docker frontend Issues that require a frontend change labels Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docker enhancement New feature or request frontend Issues that require a frontend change help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants