Offer a script to switch to WAL mode

This commit is contained in:
Cadence Ember 2023-10-09 13:50:03 +13:00
parent af274ede53
commit 26abd560b0
3 changed files with 9 additions and 1 deletions

2
.gitignore vendored
View File

@ -2,4 +2,4 @@ node_modules
config.js
registration.yaml
coverage
db/ooye.db
db/ooye.db*

View File

@ -51,6 +51,8 @@ Only necessary data and columns are queried from the database. We only contact t
File uploads (like avatars from bridged members) are checked locally and deduplicated. Only brand new files are uploaded to the homeserver. This saves loads of space in the homeserver's media repo, especially for Synapse.
Switching to [WAL mode](https://www.sqlite.org/wal.html) could improve your database access speed even more. Run `node scripts/wal.js` if you want to switch to WAL mode.
# Setup
If you get stuck, you're welcome to message @cadence:cadence.moe to ask for help setting up OOYE!

6
scripts/wal.js Normal file
View File

@ -0,0 +1,6 @@
// @ts-check
const sqlite = require("better-sqlite3")
const db = new sqlite("db/ooye.db", {fileMustExist: true})
db.pragma("journal_mode = wal")
db.close()