From: Alexander Butenko Date: Sat, 31 Mar 2012 01:28:06 +0000 (+0200) Subject: Use sqlite WAL mode for history if available X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e0dc32017b84b2c4b7a91445894b8eab7e2ef02;p=midori Use sqlite WAL mode for history if available --- diff --git a/midori/main.c b/midori/main.c index b19914ff..ac187d92 100644 --- a/midori/main.c +++ b/midori/main.c @@ -441,9 +441,12 @@ midori_history_initialize (KatzeArray* array, return FALSE; } + if (sqlite3_exec (db, + "PRAGMA journal_mode = WAL; PRAGMA cache_size = 32100;", + NULL, NULL, errmsg) != SQLITE_OK) + sqlite3_exec (db, "PRAGMA journal_mode = TRUNCATE;", NULL, NULL, errmsg); sqlite3_exec (db, - /* "PRAGMA synchronous = OFF; PRAGMA temp_store = MEMORY" */ - "PRAGMA count_changes = OFF; PRAGMA journal_mode = TRUNCATE;", + "PRAGMA synchronous = NORMAL; PRAGMA temp_store = MEMORY;", NULL, NULL, errmsg); if (*errmsg) {