1
0
mirror of https://git.sr.ht/~cadence/bibliogram synced 2025-12-14 02:35:06 +00:00

Changed the journal mode of the SQLite DB to WAL.

https://github.com/JoshuaWise/better-sqlite3/issues/262#issuecomment-549872386

https://www.sqlite.org/wal.html

Just do it. It should near instanly make Bibliogram faster.
This commit is contained in:
Kyle Anthony Williams
2020-11-03 11:14:41 -05:00
committed by Cadence Ember
parent eabcfc01cf
commit 0d251779f2
2 changed files with 9 additions and 8 deletions

View File

@@ -5,4 +5,5 @@ const fs = require("fs")
const dir = pj(__dirname, "../../db")
fs.mkdirSync(pj(dir, "backups"), {recursive: true})
const db = new sqlite(pj(dir, "bibliogram.db"))
db.pragma("journal_mode = WAL")
module.exports = db