LRU body_with_source_map query

This commit is contained in:
Lukas Wirth 2024-07-22 16:34:59 +02:00
parent 232e55515f
commit bd359b32b0
4 changed files with 19 additions and 26 deletions

View file

@ -168,6 +168,7 @@ impl RootDatabase {
// macro expansions are usually rather small, so we can afford to keep more of them alive
hir::db::ParseMacroExpansionQuery.in_db_mut(self).set_lru_capacity(4 * lru_capacity);
hir::db::BorrowckQuery.in_db_mut(self).set_lru_capacity(base_db::DEFAULT_BORROWCK_LRU_CAP);
hir::db::BodyWithSourceMapQuery.in_db_mut(self).set_lru_capacity(2048);
}
pub fn update_lru_capacities(&mut self, lru_capacities: &FxHashMap<Box<str>, u16>) {
@ -192,6 +193,7 @@ impl RootDatabase {
.copied()
.unwrap_or(base_db::DEFAULT_BORROWCK_LRU_CAP),
);
hir::db::BodyWithSourceMapQuery.in_db_mut(self).set_lru_capacity(2048);
}
}