Replies: 1 comment
-
The insert alone or both the download and the insert? If you split the inserts the insert into smaller batches, you can absolutely use reads and writes concurrently. If you want the initial insert to happen entirely on a background isolate, you could also use write-ahead logging and open the database on multiple isolates - that way, the reads and writes are actually happening in parallel.
In this case I recommend enabling WAL even more, it decreases the chance of readers and writes blocking each other. You can also set the busy timeout pragma to a few milliseconds to have sqlite3 retry operations automatically.
This shouldn't change anything.
Using
If you have a stream with thousands of rows that is updating very frequently, that might be a source of slowdowns. If you run into problems with that, you could try using |
Beta Was this translation helpful? Give feedback.
-
Hi @simolus3 ,
Our application is developed with offline support. So once the user is logged into our application, we will fetch the necessary data for the logged-in user and store it in the local database. Currently, what we are doing is: After a successful login, we are displaying the loading screen until the data download and insert are complete. For some users, it is taking more than 10 minutes. So currently, what we are thinking is that after logging in, we can allow the user to navigate to the home screen and allow the user to use the app. In the background, we will insert the data.
My questions are,
Beta Was this translation helpful? Give feedback.
All reactions