]> spindle.queued.net Git - midori/commitdiff
Sqlite pragma tuning for formhistory and history
authorAlexander Butenko <a.butenka@gmail.com>
Thu, 16 Feb 2012 19:32:41 +0000 (15:32 -0400)
committerChristian Dywan <christian@twotoasts.de>
Sun, 19 Feb 2012 16:52:12 +0000 (17:52 +0100)
extensions/formhistory/formhistory.c
midori/main.c

index 4a3e8dc83786c6690d668a65b37612c9252ae4fc..f7a491046cc9276eec6871d07f195923e943a0b8 100644 (file)
@@ -531,6 +531,10 @@ formhistory_activate_cb (MidoriExtension* extension,
                            "forms (domain text, field text, value text)",
                            NULL, NULL, &errmsg) == SQLITE_OK))
     {
+        sqlite3_exec (db,
+            /* "PRAGMA synchronous = OFF; PRAGMA temp_store = MEMORY" */
+            "PRAGMA count_changes = OFF; PRAGMA journal_mode = TRUNCATE;",
+            NULL, NULL, &errmsg);
         priv->db = db;
     }
     else
index 4a92b0e3c6bda1d572b6c808853c8c3b9e551a99..e1b53a5fae97fcd8eba69835b76fc8bacebdb1e9 100644 (file)
@@ -441,7 +441,10 @@ midori_history_initialize (KatzeArray*  array,
         return FALSE;
     }
 
-    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;",
+        NULL, NULL, errmsg);
     if (*errmsg)
     {
         g_warning ("Failed to set journal mode: %s", *errmsg);