From eef22e700988513e1cd56bc300064a10131780e7 Mon Sep 17 00:00:00 2001 From: Olivier 'reivilibre Date: Wed, 15 Jun 2022 21:13:56 +0100 Subject: [PATCH] Use WAL mode in SQLite bloblogs --- yama/src/pile/local_sqlitebloblogs.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/yama/src/pile/local_sqlitebloblogs.rs b/yama/src/pile/local_sqlitebloblogs.rs index 2069265..445226d 100644 --- a/yama/src/pile/local_sqlitebloblogs.rs +++ b/yama/src/pile/local_sqlitebloblogs.rs @@ -247,6 +247,13 @@ impl SqliteBloblogPile { )?; } + // Enable WAL mode for significantly better write performance. + connection.execute_batch( + " + PRAGMA journal_mode=WAL; + ", + )?; + Ok(SqliteBloblogPile { inner: Arc::new(Mutex::new(Inner { next_bloblog_id: 0,