aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/change.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-05-04 13:29:35 +0100
committerAleksey Kladov <[email protected]>2019-05-04 13:29:35 +0100
commitca5aedc9bfd28e5e39567a42391423a2d4d97f2c (patch)
tree98151c8ff355e9845f1dbcf9c8c9aaef11bf4267 /crates/ra_ide_api/src/change.rs
parent8ee8542de23253ec29f1b817aeb975313875885d (diff)
revert eagarly clean astd maps
This causes massive slowdown :-(
Diffstat (limited to 'crates/ra_ide_api/src/change.rs')
-rw-r--r--crates/ra_ide_api/src/change.rs7
1 files changed, 1 insertions, 6 deletions
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 {
186 if let Some(crate_graph) = change.crate_graph { 186 if let Some(crate_graph) = change.crate_graph {
187 self.set_crate_graph(Arc::new(crate_graph)) 187 self.set_crate_graph(Arc::new(crate_graph))
188 } 188 }
189 self.collect_after_change()
190 } 189 }
191 190
192 fn apply_root_change(&mut self, root_id: SourceRootId, root_change: RootChange) { 191 fn apply_root_change(&mut self, root_id: SourceRootId, root_change: RootChange) {
@@ -216,6 +215,7 @@ impl RootDatabase {
216 } 215 }
217 216
218 pub(crate) fn collect_garbage(&mut self) { 217 pub(crate) fn collect_garbage(&mut self) {
218 let _p = profile("RootDatabase::collect_garbage");
219 self.last_gc = time::Instant::now(); 219 self.last_gc = time::Instant::now();
220 220
221 let sweep = SweepStrategy::default().discard_values().sweep_all_revisions(); 221 let sweep = SweepStrategy::default().discard_values().sweep_all_revisions();
@@ -229,9 +229,4 @@ impl RootDatabase {
229 self.query(hir::db::RawItemsWithSourceMapQuery).sweep(sweep); 229 self.query(hir::db::RawItemsWithSourceMapQuery).sweep(sweep);
230 self.query(hir::db::BodyWithSourceMapQuery).sweep(sweep); 230 self.query(hir::db::BodyWithSourceMapQuery).sweep(sweep);
231 } 231 }
232
233 pub(crate) fn collect_after_change(&mut self) {
234 let sweep = SweepStrategy::default().discard_everything().sweep_all_revisions();
235 self.query(hir::db::AstIdToNodeQuery).sweep(sweep)
236 }
237} 232}