From 616b77c10fc0155836a9eb584a692087e8828f8a Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 18 Jan 2020 11:39:46 +0100 Subject: [PATCH] Set WAL checkpoint interval to 100 https://www.sqlite.org/pragma.html#pragma_wal_checkpoint --- app/src/main/java/eu/faircode/email/DB.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/DB.java b/app/src/main/java/eu/faircode/email/DB.java index ec7374a3f8..118807d5b1 100644 --- a/app/src/main/java/eu/faircode/email/DB.java +++ b/app/src/main/java/eu/faircode/email/DB.java @@ -110,6 +110,8 @@ public abstract class DB extends RoomDatabase { sInstance = migrate(acontext, getBuilder(acontext)); + sInstance.getOpenHelper().getWritableDatabase().execSQL("PRAGMA wal_autocheckpoint=100;"); + // https://www.sqlite.org/lang_vacuum.html SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); boolean vacuum = prefs.getBoolean("vacuum", false);