Skip to content

Commit 4759ec5

Browse files
Merge pull request #757 from Mark-Simulacrum/debug-crater
Keep experiment_crates in the page cache
2 parents c2a7846 + 94cdfd2 commit 4759ec5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/db/mod.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@ impl r2d2::ManageConnection for SqliteConnectionManager {
2727
.pragma_update(None, "foreign_keys", "ON")
2828
.unwrap();
2929

30-
// increase the in-memory cache from 2MB to 50MB
30+
// the goal of this is to try to keep `experiment_crates` mostly cached in memory.
31+
// that makes it much faster to scan it for the next crate we want to serve.
3132
connection
32-
.pragma_update(None, "cache_size", "-51200")
33+
.pragma_update(None, "cache_size", "-307200")
3334
.unwrap();
3435

3536
// per docs, this is recommended for relatively long-lived connections (like what we have

0 commit comments

Comments
 (0)