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

Load coeffs.bin separately from wasm code in webzebra #18

Open
panstromek opened this issue Apr 16, 2022 · 0 comments
Open

Load coeffs.bin separately from wasm code in webzebra #18

panstromek opened this issue Apr 16, 2022 · 0 comments

Comments

@panstromek
Copy link
Owner

Currently, the coeffs.bin file is baked into the the wasm bundle with include_bytes macro, but this is not ideal, because it makes the bundle about 6 times bigger. Also the file never changes, so while we could in theory let browser and CDN cache it forever, we invalidate it on every build, whenever we change something in wasm code.

We can instead load the file separately and then copy it into wasm memory. This could make webzebra load slower because we would have to copy the file into wasm memory, but it could also make it faster, because we can download this file in parallel with loading+parsing wasm and wasm parser will have less stuff to parse. If the file is cached in the browser, this could be even faster because we wouldn't have to load it at all. I'd like to see numbers on this method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant