Open n1k0 opened 9 years ago
Not sure if this is relevant here, but just wanted to mention how important batching together writes to IndexedDB is, for performance. This is also a topic in localForage, we are trying to do automatic batching of writes there. The basic principle of that is:
After a quick discussion with @ametaireau, here's the current state of our thinking on this:
Thoughts?
When https://bugzilla.mozilla.org/show_bug.cgi?id=1193394 will land in Firefox, it will be possible to have IndexedDB transactions across promises in Chrome+Firefox.
That's it! It landed!
Firefox 60 supports promises within IndexedDB transactions \o/
There is a lot of things that could be simplified, quite a huge amount of work.
Wow! :)
So we can abort the whole import process on error, avoiding leaving the db in an inconsistent state.