How to run 'rw' transaction in parallel with 'r' transaction? #2135
Replies: 1 comment
-
Hi! No, indexedDB will lock the table ("Data" in this case) from both read and write during an 'rw' transaction but other tables can be read in paralell. If each chunk is added in its own transaction (which will implicitly be the case if you just do bulkPut() without a transaction) it would leave some air for read queries to be done in between. However, in my opinion, the user experience would probably be the best if applications goes into a specific state, showing some kind of spinner or progress and nothing else during heavy sync operations. In such a state, best performance is gained if all components using liveQuery is unmounted so the user only sees the progress message and nothing else until sync is done. |
Beta Was this translation helpful? Give feedback.
-
I have a scenario where I am inserting data that is big in chunks to dexie tables. This process might take a while. At the same time, I want the user to be able to do things like searching in such tables even if the insertion process isn't done yet. Is that kind of concurrency supported with dexie or not?
Beta Was this translation helpful? Give feedback.
All reactions