[smuxi] Engine: enabled WAL in SqliteMessageBuffer to fix awful performance



commit 463946371cdab9e95135d2e94bbe819552f21ad2
Author: Mirco Bauer <meebey meebey net>
Date:   Wed Feb 26 22:42:17 2014 +0100

    Engine: enabled WAL in SqliteMessageBuffer to fix awful performance

 src/Engine/MessageBuffers/SqliteMessageBuffer.cs |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/Engine/MessageBuffers/SqliteMessageBuffer.cs 
b/src/Engine/MessageBuffers/SqliteMessageBuffer.cs
index 429e596..298ffcc 100644
--- a/src/Engine/MessageBuffers/SqliteMessageBuffer.cs
+++ b/src/Engine/MessageBuffers/SqliteMessageBuffer.cs
@@ -58,7 +58,11 @@ namespace Smuxi.Engine
                               base(sessionUsername, protocol, networkId, chatId)
         {
             DBPath = GetBufferPath() + ".sqlite3";
-            Connection = new SqliteConnection("URI=file:" + DBPath);
+            Connection = new SqliteConnection(
+                "Data Source=" + DBPath + ";" +
+                // enable Write-Ahead-Log (WAL)
+                "Journal Mode=WAL"
+            );
             Connection.Open();
 
             var sql = "CREATE TABLE IF NOT EXISTS Messages (" +


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]