mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
sql: disable cipher_memory_security SQLCipher PRAGMA
It slows down dc_get_chat_msgs() from ~50ms to seconds on Android. It is disabled by default in SQLCipher 4.5.0, but currently SQLCipher 4.4.3 is bundled so this PRAGMA has to be disabled manually.
This commit is contained in:
@@ -84,7 +84,8 @@ impl Sql {
|
||||
.with_flags(open_flags)
|
||||
.with_init(|c| {
|
||||
c.execute_batch(&format!(
|
||||
"PRAGMA secure_delete=on;
|
||||
"PRAGMA cipher_memory_security = OFF; -- Too slow on Android
|
||||
PRAGMA secure_delete=on;
|
||||
PRAGMA busy_timeout = {};
|
||||
PRAGMA temp_store=memory; -- Avoid SQLITE_IOERR_GETTEMPPATH errors on Android
|
||||
",
|
||||
|
||||
Reference in New Issue
Block a user