I'm rethinking my former advice around web storage: localStorage reads are super fast since they read an in memory cache, writes are very slow. IndexedDB KV storage (like the built-in API proposal) has slow reads *and* writes and event loop delays on reads. @shubhie @_developit
-
-
It's as slow as there is work on the event loop. If the Worker has a lot of large tasks queued up each read could be very delayed. Most apps don't need to hit disk on every read though. LocalStorage semantics of in memory cache + sync event is fine.
-
Yeah, in my experience most KV storage use cases require an in-memory JS object anyway (to handle private browsing mode). Which is why I hope we get IDB observers soon (at least localStorage has the `storage` event).
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
& Web Standards TL; Blink API OWNER
Named PWAs w/
DMs open. Tweets my own; press@google.com for official comms.