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

Wasm file size #10

Open
jimmykane opened this issue Jan 25, 2020 · 5 comments
Open

Wasm file size #10

jimmykane opened this issue Jan 25, 2020 · 5 comments

Comments

@jimmykane
Copy link

I am not an expert here but this lib size is about 158Kb (wasm file the browser downloads).

Is there any way this can be optimized? 158Kb can be quite a lot even now-a-days.

@danielsan
Copy link

Perhaps having specific wasm files per feature.

I'm using pako because I'm able to require only the gzip portion of it, then my final bundle right now is about 30k after webpack.

That's because the work I'm doing I need only to gzip content, I don't need to deflate, inflate or, gunzip;

Having those features within the file would be a big penalty for an old android with a 3G connection across the globe to download it.

@jimmykane
Copy link
Author

jimmykane commented Apr 5, 2020

@danielsan that is exactly my use case. Do you have a package for this?

I don't think it's about the 30Kb / 150Kb but those do stack up eventually. I mean Angular can be around 70kb get the point here?

@danielsan
Copy link

That's exactly what I meant while using only the gzip feature from pako.
My whole deployable script is about 30k with all the dependencies, but if include the whole pako lib with all its functionalities it goes to 47k in my case.

I don't know yet how to export a .wasm file with only the gzip feature but that is my idea

@jimmykane
Copy link
Author

@danielsan oh ok got it. I thought you did the same for the wasm file.

I think for wasm (without being an expert) it depends to towards what compatibility its targeted, not the code per say but I can also be total.y wrong.

@JakubKoralewski
Copy link

pako minification is quite amazing. I've used jsziptools previously and while the unminified source code is similar (~250kB) the minified pako (I'm using just inflate) is ~60kB while jsziptools is ~190kB. Cray cray.

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

3 participants