Can anyone point me to an article on, or preferably provide some experience of performance of IndexedDB (ideally in Chrome) - what is the fetch, insert and update performance like?
There seems to be reasonable amount of opinion that its pretty much unusable for data sets of more than a few thousand records but I'm not sure if this isnt just due to a lack of indexing - surely conceptually it cant be slower than web storage as both presumably use key-value storage internally?
Thanks
LocalStorage is slightly faster than IndexedDB in all browsers (disregarding the crashes). IndexedDB is not significantly slower when run in a web worker, and never blocks the DOM that way.
The W3C has announced that the Web SQL database is a deprecated local storage specification so web developer should not use this technology any more. indexeddb is an alternative for web SQL data base and more effective than older technologies.
As I've alluded to, IndexedDB is a good fit if your client-side data needs are more complex than what Local/SessionStorage can provide (i.e. you're looking for more than a simple Key/Value store in your application). Yes, you can use JavaScript functions (such as JSON. stringify and JSON.
IndexedDB is a way for you to persistently store data inside a user's browser.
I recently did some performance comparisons between WebSQL and IndexedDB. Surprisingly, IndexedDB won (which I wasn't expecting).
http://blog.oharagroup.net/post/16394604653/a-performance-comparison-websql-vs-indexeddb
Edit: the above URL is down, but available on archive.org: http://web.archive.org/web/20160418233232/http://blog.oharagroup.net/post/16394604653/a-performance-comparison-websql-vs-indexeddb
In summary:
WebSQL takes on average between ~750-850ms to complete the query and render the results; and IndexedDB takes on average ~300-350ms to render the exact same results.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With