From 15668119de40b97011a1f2e2d065d11f25a5833a Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 7 Jun 2019 12:46:49 +0300 Subject: make LRU_CAP configurable for batch db --- crates/ra_ide_api/src/db.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'crates/ra_ide_api/src') diff --git a/crates/ra_ide_api/src/db.rs b/crates/ra_ide_api/src/db.rs index 4f19b01c4..cccf0ada4 100644 --- a/crates/ra_ide_api/src/db.rs +++ b/crates/ra_ide_api/src/db.rs @@ -49,8 +49,9 @@ impl Default for RootDatabase { db.set_crate_graph(Default::default()); db.set_local_roots(Default::default()); db.set_library_roots(Default::default()); - db.query_mut(ra_db::ParseQuery).set_lru_capacity(128); - db.query_mut(hir::db::ParseMacroQuery).set_lru_capacity(128); + let lru_cap = ra_db::DEFAULT_LRU_CAP; + db.query_mut(ra_db::ParseQuery).set_lru_capacity(lru_cap); + db.query_mut(hir::db::ParseMacroQuery).set_lru_capacity(lru_cap); db } } -- cgit v1.2.3