Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/corro-types/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub const DEFAULT_MAX_SYNC_BACKOFF: u32 = 2;
pub const DEFAULT_MAX_SYNC_BACKOFF: u32 = 15;

const fn default_apply_queue() -> usize {
100
10000
}

const fn default_reaper_interval() -> usize {
Expand Down
8 changes: 7 additions & 1 deletion crates/corro-types/src/sqlite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,13 @@ static CRSQL_EXT_DIR: Lazy<TempDir> = Lazy::new(|| {

pub fn rusqlite_to_crsqlite_write(conn: rusqlite::Connection) -> rusqlite::Result<CrConn> {
let conn = rusqlite_to_crsqlite(conn)?;
conn.execute_batch("PRAGMA cache_size = -32000;")?;
conn.execute_batch(
"
PRAGMA cache_size = -1048576; -- 1 GB (value in KiB, negative sign)
PRAGMA temp_store = MEMORY;
PRAGMA cache_spill = FALSE;
",
)?;

Ok(conn)
}
Expand Down
Loading