Offer a script to switch to WAL mode
This commit is contained in:
parent
af274ede53
commit
26abd560b0
3 changed files with 9 additions and 1 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -2,4 +2,4 @@ node_modules
|
|||
config.js
|
||||
registration.yaml
|
||||
coverage
|
||||
db/ooye.db
|
||||
db/ooye.db*
|
||||
|
|
|
@ -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
6
scripts/wal.js
Normal 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()
|
Loading…
Reference in a new issue