Auto merge of #17639 - Veykril:salsa-perf, r=Veykril

Some more small salsa memory improvements

This does limit our lru limits to 2^16 but if you want to set them higher than that you might as well not set them at all. Also makes `LRU` opt-in per query now, allowing us to drop all the unnecessary LRU stuff for most queries
This commit is contained in:
bors 2024-07-19 18:45:16 +00:00
commit b333f85a9d
18 changed files with 1240 additions and 402 deletions

View file

@ -65,7 +65,7 @@ pub trait ExpandDatabase: SourceDatabase {
#[salsa::transparent]
fn parse_or_expand_with_err(&self, file_id: HirFileId) -> ExpandResult<Parse<SyntaxNode>>;
/// Implementation for the macro case.
// This query is LRU cached
#[salsa::lru]
fn parse_macro_expansion(
&self,
macro_file: MacroFileId,