-
I've followed the same setup as in the encrypted sample: https://github.com/simolus3/drift/blob/develop/examples/encryption/lib/database.dart Here's the simplified flow of my app
When the database starts to get big (40k items ~ 200MB), loading the data on the edit screen is very slow. On this timeline, the first Since the second SELECT query is much faster, I don't think it's because of the query itself. This was running on a Galaxy S24 / Android 14. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
I don't see an obvious cause for this right away. If you run the same statement before the write transaction, is it equally slow? Or is the transaction responsible for increasing the database size? I'm wondering if there may be an issue with slow reads and the second select is faster due to an in-memory cache, but it's still weird. One thing worth noticing is that this uses a single database connection, so |
Beta Was this translation helpful? Give feedback.
I've done some more testing and the issue was definitely coming from the
watch
queries.I'll check how to improve them. Thanks for your help!