Comment by ori_b
5 years ago
Because you've got another operation triggered by a UI action, and you need the previous one to finish, for example.
5 years ago
Because you've got another operation triggered by a UI action, and you need the previous one to finish, for example.
Sure, but you shouldn't need to block the thread for this. Most applications that have to deal with this sort of thing would present a loading indicator or something instead while a different thread is busy doing the actual transaction work. This is both possible and encouraged with (to my knowledge) literally every desktop or mobile UI framework written in the last 20 years.
And to be clear: this will still be user-visible with literally any other file format. The slow part ain't SQLite itself; it's the disk to which you're writing.
That doesn't answer the question. You never should have to block the UI thread. That's just poor application design, independent of the file format; you cannot blame that on SQLite.
If the user interface depends on synchronous IO something is very wrong.