1
0
Fork 0
mirror of https://gitlab.com/famedly/conduit.git synced 2025-06-27 16:35:59 +00:00

fix: faster room joins

This commit is contained in:
Timo Kösters 2021-08-17 00:22:52 +02:00 committed by Jonas Zohren
parent 4a9483c07c
commit 8a4b7cf4bd
3 changed files with 12 additions and 3 deletions

View file

@ -49,11 +49,11 @@ impl Engine {
fn prepare_conn(path: &Path, cache_size_kb: u32) -> Result<Connection> {
let conn = Connection::open(&path)?;
conn.pragma_update(Some(Main), "page_size", &1024)?;
conn.pragma_update(Some(Main), "page_size", &2048)?;
conn.pragma_update(Some(Main), "journal_mode", &"WAL")?;
conn.pragma_update(Some(Main), "synchronous", &"NORMAL")?;
conn.pragma_update(Some(Main), "cache_size", &(-i64::from(cache_size_kb)))?;
conn.pragma_update(Some(Main), "wal_autocheckpoint", &8000)?;
conn.pragma_update(Some(Main), "wal_autocheckpoint", &2000)?;
Ok(conn)
}