3 ms·
Why would you block the UI thread on a transaction?
by lalaland1125 6y ago
Why would you block the UI thread on a transaction?
- ori_b 6y agoBecause you've got another operation triggered by a UI action, and you need the previous one to finish, for example.
- yellowapple 6y agoSure, 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.
- sdinsn 6y agoThat 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.
- carlhjerpe 6y agoIf the user interface depends on synchronous IO something is very wrong.