[Xfce4-commits] <midori:master> Use sqlite WAL mode for history if available

Christian Dywan noreply at xfce.org
Sat Mar 31 03:30:03 CEST 2012


Updating branch refs/heads/master
         to 3e0dc32017b84b2c4b7a91445894b8eab7e2ef02 (commit)
       from 4c4c84944182bb6ad582078c976c2ba85511bf00 (commit)

commit 3e0dc32017b84b2c4b7a91445894b8eab7e2ef02
Author: Alexander Butenko <a.butenka at gmail.com>
Date:   Sat Mar 31 03:28:06 2012 +0200

    Use sqlite WAL mode for history if available

 midori/main.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/midori/main.c b/midori/main.c
index b19914f..ac187d9 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)
     {


More information about the Xfce4-commits mailing list