From 69c319d62a6369f5ad6c14111beb76ab4733dd40 Mon Sep 17 00:00:00 2001 From: Alexander Butenko Date: Thu, 16 Feb 2012 15:32:41 -0400 Subject: [PATCH] Sqlite pragma tuning for formhistory and history --- extensions/formhistory/formhistory.c | 4 ++++ midori/main.c | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/extensions/formhistory/formhistory.c b/extensions/formhistory/formhistory.c index 4a3e8dc8..f7a49104 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 4a92b0e3..e1b53a5f 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); -- 2.39.5