-
Notifications
You must be signed in to change notification settings - Fork 937
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
Performance: Improve how MB handles local cache #4305
Comments
@pikurasa We can use APIs like IndexedDB or Dexie. js |
Please tell us more about those options. |
I am researching on this. Till now what I have learned is that localStorage can't handle large amounts of data. This could be the reason for being slow. |
@pikurasa we can also use origin private file system (OPFS) which is a highly optimal solution to this |
Hey @Commanderk3 , I think we already ARE using indexedDB. I think the issue here is that the website is currently loading every single one of my projects fully from the database into memory, even if it only shows one project on the screen. AND as mentioned by @pikurasa sir: A solution to this is implementing lazy loading into ProjectStorage.js . By doing this we ONLY allow meta data, like Name, data, image of project saved and NOT the entire DATA OF PROJECT itself.I might actually be wrong with this, can you review this comment? I'm looking into it's implementation. |
@FirePheonix, what you said is correct. It loads more than one project. All these projects are shown in "My Projects" on the planet page. |
Description
Every time a user creates a new project, it -- a JSON string -- is stored into the browser's cache.
We've had performance issues upon loading Music Blocks (MB) for a while, and finally determined that loading takes longer the more projects a user has stored to their local browser cache.
In order to solve this problem, we need to look into how we handle local data, so that loading time can be improved.
Expected Behavior
We want MB to load as fast as possible. Preferably as fast as it does from a private tab.
How to Reproduce
One way you can test this is:
Console log Errors:
I'm not really sure what logs may be related to this issue. It would be helpful if someone with experience in performance could look into this.
Environment:
Note: Faster computers, especially ones with decent GPUs, in my testing, are less noticeably effected by this issue because the overall loading time is faster in either case. If you test on a faster computer, you should also try on a slower machine as well. And, in any case, always make sure to compare against a session that has many projects loaded (see above).
Checklist
Thank you for contributing to our project! We appreciate your help in improving it.
📚 See contributing instructions.
🙋🏾🙋🏼 Questions: Community Matrix Server.
The text was updated successfully, but these errors were encountered: