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

Full bundling of precomputed slider states #118

Draft
wants to merge 1 commit into
base: static-export-1
Choose a base branch
from

Conversation

ctrekker
Copy link
Member

@ctrekker ctrekker commented Jun 14, 2023

This is a draft PR for a draft PR! Precomputed sliders require many files which are often small and very similar to one another. Bundling solves both these problems in one go:

  1. Bundles can be stored in a single larger file, which can be served statically in its compressed form to reduce size
  2. Notebook clients need only request a bundle once, meaning precomputed values contained within load instantly once the bundle has been downloaded

With the following notebook we see a massive 96% compression of the staterequest folder (where the notebook updates are stored)

BEFORE BUNDLING
17M     60qMnIsupXiarVwdoPP2Vg9cewKaBJfJTlSOgeeEtW0/
AFTER BUNDLING + COMPRESSION
608K    60qMnIsupXiarVwdoPP2Vg9cewKaBJfJTlSOgeeEtW0/

Screenshot from 2023-06-14 14-10-32

There are inherent limitations to this method, so this PR will not be helpful for all notebooks. For very large slider spaces, bundling the entire space will simply be too large to load in a browser. Future changes may or may not address this issue by implementing partial bundles which only include a certain carefully chosen subset of slider values.

EDIT: Complimentary changes to the sliderserver client are in fonsp/Pluto.jl#2585

@fonsp
Copy link
Member

fonsp commented Jun 20, 2023

Super nice!!! Can you make a draft PR on the pluto side and link here?

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.

2 participants