diff options
author | eta <tor@eta.st> | 2023-10-12 21:50:16 +0100 |
---|---|---|
committer | eta <tor@eta.st> | 2023-10-12 21:50:16 +0100 |
commit | ea7baf006b6aa44171acfd80598f027d9e1f7d3a (patch) | |
tree | 2024aea19086b42eadc6ca16c22161c18f632ff3 | |
parent | 3d8cb7b2d50daf3a6a8fc938675ff9b2bb947a5b (diff) | |
download | arti-ios-sqlite-hacks.tar.gz arti-ios-sqlite-hacks.zip |
hack in some sqlite memory limits to see if that helpsios-sqlite-hacks
-rw-r--r-- | crates/tor-dirmgr/src/storage/sqlite.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/tor-dirmgr/src/storage/sqlite.rs b/crates/tor-dirmgr/src/storage/sqlite.rs index 343be00a7..da8768c3e 100644 --- a/crates/tor-dirmgr/src/storage/sqlite.rs +++ b/crates/tor-dirmgr/src/storage/sqlite.rs @@ -106,6 +106,8 @@ impl SqliteStore { OpenFlags::SQLITE_OPEN_READ_WRITE | OpenFlags::SQLITE_OPEN_CREATE }; let conn = rusqlite::Connection::open_with_flags(&sqlpath, flags)?; + conn.execute_batch("PRAGMA mmap_size=268435456;")?; + conn.execute_batch("PRAGMA hard_heap_limit=5000000;")?; // 5 MB let mut store = SqliteStore::from_conn(conn, blob_dir)?; store.sql_path = Some(sqlpath); store.lockfile = Some(lockfile); |