-
Notifications
You must be signed in to change notification settings - Fork 3
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
Retreving cached HTML from localStorage is taking > 150ms #4
Comments
A. would be the quickest option to try right away. We would also likely get a win lowering first-pain time too due to the reduction in number of |
Vivien really wants us to try the Cache API for that. The rationale is that it doesn't need to run on the main thread of the main process so it should play nicer on the launch path of an app. |
I tried IndexedDB, but it resulted in a flash of white before the content was ready. I've never used the Cache API, is it ready to use now? |
Just spoke to Francisco, gonna try it out when I have some time. |
Reduce the number of bytes stored in localStorage (issue #4)
I have a branch using the Cache API and so far results seem promising. It's taking 100 - 200ms to retrieve the cached content on startup, but this should not block unlike localStorage. I've found opening the cache as soon as possible (before cache content is explicitly requested) seems to lead to fastest retrieval on startup. I'm running into issues with the There are several ways we can address this, non of which seem ideal yet: A. We could wait for the request for B. We could update the height later. This will cause additional reflows and cause scrollbar flashing which is one of the things this feature aimed to avoid in the first place. C. We could store the height integer in a synchronous storage container ( I should also note that now cached HTML is fetched and injected async, we must be careful to avoid race conditions with the real fast-list. There is always a chance that |
Right now I'm doing this inline as one of the very first things in But it has the advantage of giving us a boost of cache retrieval times when |
Rewrote caching solution with Cache API to remove dependency on localStorage (closes #4)
We can try:
A. Store less HTML (less bytes should make retrieval faster).
B. Store just the data and manually construct the elements/HTML before injecting into DOM.
The text was updated successfully, but these errors were encountered: