Use WAL mode in SQLite bloblogs

This commit is contained in:
Olivier 'reivilibre' 2022-06-15 21:13:56 +01:00
parent 332563f5a7
commit eef22e7009
1 changed files with 7 additions and 0 deletions

View File

@ -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,