-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
server : (web ui) Enable gzip compression for local storage #10945
base: master
Are you sure you want to change the base?
server : (web ui) Enable gzip compression for local storage #10945
Conversation
IMO this feature is not really needed, because compressing localStorage can make it tricky to debug, while only provide at maximum 5x storage, not scalable. The more scalable would be to migrate to IndexedDB, which provide at minimum 50MB of storage according some sources on internet (although usually there is no hard limit). There are also many libraries that provide easier-to-use interface. I would appreciate if you can write an interface for IndexedDB. The compressed localStorage is not a valid solution atm, we can only keep it as a demo if you want to continue. |
Thanks for the opinion. I agree that migrating to IndexedDB is a good idea, and I’ll explore ways to implement it with minimal changes. |
We can keep this PR as a demo, but I don't think we can merge it to |
Description
localStorage
typically ranges from 2 MB to 10 MB, depending on the browser.gzip
compression forlocalStorage
by intercepting the storage methods, effectively increasing storage capacity by up to 4 to 5 times.useCompression
switch.brotli
or other compression methodMajor changes
pako
library for gzip compression: 03a44d8Test env
TODO