mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Reduce maximum LRU size to 2^16 entries, reducing memory footprint of LRU entries
This commit is contained in:
parent
4691ca97f1
commit
8e3133f118
9 changed files with 50 additions and 49 deletions
|
@ -379,7 +379,7 @@ fn load_crate_graph(
|
|||
) -> RootDatabase {
|
||||
let ProjectWorkspace { toolchain, target_layout, .. } = ws;
|
||||
|
||||
let lru_cap = std::env::var("RA_LRU_CAP").ok().and_then(|it| it.parse::<usize>().ok());
|
||||
let lru_cap = std::env::var("RA_LRU_CAP").ok().and_then(|it| it.parse::<u16>().ok());
|
||||
let mut db = RootDatabase::new(lru_cap);
|
||||
let mut analysis_change = ChangeWithProcMacros::new();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue