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

Fix broken notebook loading on firefox by compressing the encoded wasm payload #8426

Merged
merged 2 commits into from
Dec 12, 2024

Conversation

jleibs
Copy link
Member

@jleibs jleibs commented Dec 11, 2024

Related

What

It turns out firefox doesn't let you create a dataurl larger than 32MB. Although our .wasm was under this threshold, the overhead of base64-encoding pushed us over the threshold.

However, as we were encoding the raw, uncompressed .wasm, we still actually have plenty of margin... we just need to jump through more hoops to use it now. Using DecompressionStream like this seems to be generally available across our target browsers so I think we should be good?

@jleibs jleibs added the notebook Jupyter notebooks etc label Dec 11, 2024
@jleibs jleibs marked this pull request as ready for review December 11, 2024 23:42
@jleibs jleibs changed the title Compress the encoded wasm payload in the dataurl for jupyter notebooks Fix broken notebook loading on firefox by compressing the encoded wasm payload Dec 11, 2024
@jleibs jleibs added the 🦟 regression A thing that used to work in an earlier release label Dec 11, 2024
Copy link

github-actions bot commented Dec 11, 2024

Web viewer failed to build.

Result Commit Link Manifest
https://rerun.io/viewer/pr/8426 +nightly +main

Note: This comment is updated whenever you push a commit.

@jleibs jleibs added the 🐍 Python API Python logging API label Dec 11, 2024
@jleibs jleibs force-pushed the jleibs/compress_notebook_wasm branch from 682ba20 to 1aaca2c Compare December 11, 2024 23:48
@teh-cmc teh-cmc requested a review from jprochazk December 12, 2024 08:27
@jprochazk
Copy link
Member

For posterity, there's some docs about it here: https://developer.mozilla.org/en-US/docs/Web/URI/Schemes/data#length_limitations

@jleibs jleibs merged commit e1aea95 into main Dec 12, 2024
24 of 26 checks passed
@jleibs jleibs deleted the jleibs/compress_notebook_wasm branch December 12, 2024 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
include in changelog notebook Jupyter notebooks etc 🐍 Python API Python logging API 🦟 regression A thing that used to work in an earlier release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Notebook cell times out on firefox
2 participants