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

Should be able to dedupe editor state across all rooms #7434

Closed
turt2live opened this issue Oct 2, 2018 · 2 comments
Closed

Should be able to dedupe editor state across all rooms #7434

turt2live opened this issue Oct 2, 2018 · 2 comments

Comments

@turt2live
Copy link
Member

A brief look through my localstorage reveals a ton of editor_state values - most of which look identical to each other. Deduping this would save roughly 135kb (not a whole lot, but still sizable)

var editorStateLen = 0; for(var key in localStorage) { if (key.startsWith("editor_state")) { editorStateLen += localStorage.getItem(key).length; } } console.log(editorStateLen);
// > 135973
@lampholder
Copy link
Member

Even with lazy loading enabled my riot uses ~350MB RAM :D

Hopefully one day we will be at the point where 135kb of wasted memory is worth saving, but it might be a little while yet :P

@t3chguy
Copy link
Member

t3chguy commented Apr 25, 2022

We now only store the state if it is non-empty

@t3chguy t3chguy closed this as completed Apr 25, 2022
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

3 participants