Closed fdambrosio closed 7 years ago
@fdambrosio I don't think that the current browsers implementation of IndexedDB is suitable for such a big data source. See the answer here for reference.
thanks @gilf, now I've found IDBObjectStore.put() method, it solves problems on bulk data insert. https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/put
@fdambrosio You can use the service's update function which will result in a call for the objectStore put function in the end. I should have called the function put instead of update but now if I'll do that it will result in breaking changes to people who are using the service.
I have a JSON file with more 200 thousands items. I slice it reducing it in smallest array length, and I iterate calling "db.add". I have a memory crash using Chrome but I haven't problems until 100 thousands items (of course waiting a lot of minutes to complete the insertion). What's the best practice for massive insert?