Thank your for your reply. That’s a lot of questions to go through. Is there something I can try first which might be enough?
To answer some of those questions:
- How much data? - On first launch, the app creates a new database (not encrypted) about 50MB in size
- I guess a single connection. I open a new database, attach about 5 other databases (about 3 encrypted with different keys) and execute the inserts
- I use
execute("ATTACH DATABASE '$pathString' AS $handle KEY '$password'") - wal mode is not enabled, and on completion of inserts I execute:
sqldb.execute("PRAGMA synchronous = FULL")
sqldb.execute("analyze")
- I don’t think the application is doing anything else during this time. Note - the only change is the sqlcipher version - all other code is the same
- I’m not sure if it’s relevant how connections are managed. This is simply a creation of database, attach some other databases, execute inserts and tidy-up (see 4). That’s all done on the same sqlite database/connection
- This was tested on a Pixel 7a