From 8b7f58976b32ccc768e35151b77aa9ea004b7495 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 2 Jun 2019 20:15:10 +0300 Subject: don't cache parses twice Before this commit, `Parse`s for original file ended up two times in salsa's db: first, when we parse original file, and second, when we parse macro or a file. Given that parse trees are the worst ofenders in terms of memory, it makes sense to make sure we store them only once. --- crates/ra_ide_api/src/change.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_ide_api/src/change.rs') diff --git a/crates/ra_ide_api/src/change.rs b/crates/ra_ide_api/src/change.rs index 02814ce56..247dc0fee 100644 --- a/crates/ra_ide_api/src/change.rs +++ b/crates/ra_ide_api/src/change.rs @@ -226,7 +226,7 @@ impl RootDatabase { self.query(ra_db::ParseQuery).sweep(sweep); - self.query(hir::db::ParseOrExpandQuery).sweep(sweep); + self.query(hir::db::ParseMacroQuery).sweep(sweep); self.query(hir::db::MacroDefQuery).sweep(sweep); self.query(hir::db::MacroArgQuery).sweep(sweep); self.query(hir::db::MacroExpandQuery).sweep(sweep); -- cgit v1.2.3