[Xfce4-commits] <midori:master> Sqlite pragma tuning for formhistory and history

Christian Dywan noreply at xfce.org
Sun Feb 19 17:54:03 CET 2012


Updating branch refs/heads/master
         to 69c319d62a6369f5ad6c14111beb76ab4733dd40 (commit)
       from 29d6de3c6e39c72ad72d1503ec84dca7cbff9860 (commit)

commit 69c319d62a6369f5ad6c14111beb76ab4733dd40
Author: Alexander Butenko <a.butenka at gmail.com>
Date:   Thu Feb 16 15:32:41 2012 -0400

    Sqlite pragma tuning for formhistory and history

 extensions/formhistory/formhistory.c |    4 ++++
 midori/main.c                        |    5 ++++-
 2 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/extensions/formhistory/formhistory.c b/extensions/formhistory/formhistory.c
index 4a3e8dc..f7a4910 100644
--- a/extensions/formhistory/formhistory.c
+++ b/extensions/formhistory/formhistory.c
@@ -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
diff --git a/midori/main.c b/midori/main.c
index 4a92b0e..e1b53a5 100644
--- a/midori/main.c
+++ b/midori/main.c
@@ -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);


More information about the Xfce4-commits mailing list