3 ms·
While localStorage is blocking it offers A LOT better performance than IndexedDB, at least based on my experience. There's also some benchmarks here: http://js
by amix 13y ago
While localStorage is blocking it offers A LOT better performance than IndexedDB, at least based on my experience.
There's also some benchmarks here: http://jsperf.com/indexeddb-vs-localstorage/6 http://jsperf.com/indexeddb-vs-localstorage/6
- deleted 13y ago[deleted]
- kevingadd 13y agoThat's because most localStorage implementations are in-memory. Chrome and FF (as far as I know) have to synchronously load all your localStorage data from disk at page load and then flush changes to disk later. This increases your page load times dramatically if the user has a spinning rust hard drive. (This is part of why localStorage has a ~2.5mb cap in Chrome and a ~5mb cap in Firefox.) So, in practice you're benchmarking actual I/O vs in-memory data structure updates.