diff --git a/Cargo.toml b/Cargo.toml index 4c9ba3f5..dbf3cf65 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -721,7 +721,6 @@ option_if_let_else = { level = "allow", priority = 1 } # TODO redundant_pub_crate = { level = "allow", priority = 1 } # TODO significant_drop_in_scrutinee = { level = "allow", priority = 1 } # TODO significant_drop_tightening = { level = "allow", priority = 1 } # TODO -suboptimal_flops = { level = "allow", priority = 1 } # TODO use_self = { level = "allow", priority = 1 } # TODO useless_let_if_seq = { level = "allow", priority = 1 } # TODO diff --git a/src/database/sqlite/mod.rs b/src/database/sqlite/mod.rs index 61d78a9a..745c6aa7 100644 --- a/src/database/sqlite/mod.rs +++ b/src/database/sqlite/mod.rs @@ -109,7 +109,7 @@ impl KeyValueDatabaseEngine for Arc { clippy::cast_sign_loss )] let cache_size_per_thread = ((config.db_cache_capacity_mb * 1024.0) - / ((conduit::utils::available_parallelism() as f64 * 2.0) + 1.0)) as u32; + / (conduit::utils::available_parallelism() as f64).mul_add(2.0, 1.0)) as u32; let writer = Mutex::new(Engine::prepare_conn(&path, cache_size_per_thread)?);