From ca5aedc9bfd28e5e39567a42391423a2d4d97f2c Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 4 May 2019 15:29:35 +0300 Subject: revert eagarly clean astd maps This causes massive slowdown :-( --- crates/ra_ide_api/src/change.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'crates/ra_ide_api') diff --git a/crates/ra_ide_api/src/change.rs b/crates/ra_ide_api/src/change.rs index 16b9ef3d5..dc6a433c4 100644 --- a/crates/ra_ide_api/src/change.rs +++ b/crates/ra_ide_api/src/change.rs @@ -186,7 +186,6 @@ impl RootDatabase { if let Some(crate_graph) = change.crate_graph { self.set_crate_graph(Arc::new(crate_graph)) } - self.collect_after_change() } fn apply_root_change(&mut self, root_id: SourceRootId, root_change: RootChange) { @@ -216,6 +215,7 @@ impl RootDatabase { } pub(crate) fn collect_garbage(&mut self) { + let _p = profile("RootDatabase::collect_garbage"); self.last_gc = time::Instant::now(); let sweep = SweepStrategy::default().discard_values().sweep_all_revisions(); @@ -229,9 +229,4 @@ impl RootDatabase { self.query(hir::db::RawItemsWithSourceMapQuery).sweep(sweep); self.query(hir::db::BodyWithSourceMapQuery).sweep(sweep); } - - pub(crate) fn collect_after_change(&mut self) { - let sweep = SweepStrategy::default().discard_everything().sweep_all_revisions(); - self.query(hir::db::AstIdToNodeQuery).sweep(sweep) - } } -- cgit v1.2.3