commit 69eaccdd8f0d5b044e7dc2e2cb6e7c750ae8f300 parent 8d592609355333fa7c031989ff7d88f8dee58d4a Author: William Casarin <jb55@jb55.com> Date: Thu, 28 Nov 2024 16:50:38 -0800 windows: cap dbsize to 16GiB for now because windows is horrible Diffstat:
M | src/app.rs | | | 10 | +++++++++- |
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/app.rs b/src/app.rs @@ -402,7 +402,15 @@ impl Damus { let imgcache_dir = path.path(DataPathType::Cache).join(ImageCache::rel_dir()); let _ = std::fs::create_dir_all(imgcache_dir.clone()); - let config = Config::new().set_ingester_threads(4); + let mapsize = if cfg!(target_os = "windows") { + // 16 Gib on windows because it actually creates the file + 1024usize * 1024usize * 1024usize * 16usize + } else { + // 1 TiB for everything else since its just virtually mapped + 1024usize * 1024usize * 1024usize * 1024usize + }; + + let config = Config::new().set_ingester_threads(4).set_mapsize(mapsize); let keystore = if parsed_args.use_keystore { let keys_path = path.path(DataPathType::Keys);