mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
LRU body_with_source_map
query
This commit is contained in:
parent
232e55515f
commit
bd359b32b0
4 changed files with 19 additions and 26 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue