Auto merge of #14410 - Veykril:query-lru-capacities, r=Veykril

internal: Add config to specifiy lru capacities for all queries

Might help figuring out what queries should be limited by LRU by default, as currently we only limit `parse`, `parse_macro_expansion` and `macro_expand`.
This commit is contained in:
bors 2023-03-30 12:20:24 +00:00
commit fc8c5139fa
8 changed files with 202 additions and 9 deletions

View file

@ -141,7 +141,10 @@ impl GlobalState {
Handle { handle, receiver }
};
let analysis_host = AnalysisHost::new(config.lru_capacity());
let mut analysis_host = AnalysisHost::new(config.lru_parse_query_capacity());
if let Some(capacities) = config.lru_query_capacities() {
analysis_host.update_lru_capacities(capacities);
}
let (flycheck_sender, flycheck_receiver) = unbounded();
let mut this = GlobalState {
sender,