Skip to content

Commit a14dda6

Browse files
committed
Auto merge of #614 - Mark-Simulacrum:opt, r=Mark-Simulacrum
Avoid increasing in-memory cache Our server is currently somewhat memory constrained, and it's easier to let the OS manage the page cache than try to do so ourselves right now. Reverts #606.
2 parents 3ea629d + 941a1f5 commit a14dda6

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/db/mod.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,6 @@ struct ConnectionCustomizer;
1919
impl CustomizeConnection<Connection, ::rusqlite::Error> for ConnectionCustomizer {
2020
fn on_acquire(&self, conn: &mut Connection) -> Result<(), ::rusqlite::Error> {
2121
conn.execute("PRAGMA foreign_keys = ON;", [])?;
22-
// Increase cache size from ~2 MB (current default) to ~100 MB.
23-
//
24-
// This should help sqlite keep pages in memory rather than needing to
25-
// seek and read. Those typically hit the OS cache, but syscalls are
26-
// still somewhat expensive at these volumes.
27-
conn.execute("PRAGMA cache_size = -100000;", [])?;
2822
Ok(())
2923
}
3024
}

0 commit comments

Comments
 (0)