diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-05-04 13:30:13 +0100 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-05-04 13:30:13 +0100 |
commit | b1febf2e6d4606a7e0eb422cdeba5dd286b10794 (patch) | |
tree | e6c3b65178ca607d96f771b5d518996a7e987344 /crates/ra_ide_api | |
parent | dc666c81011ddeebcb0219a49fe027f6d5d6d1a4 (diff) | |
parent | ca5aedc9bfd28e5e39567a42391423a2d4d97f2c (diff) |
Merge #1235
1235: revert eagarly clean astd maps r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide_api')
-rw-r--r-- | crates/ra_ide_api/src/change.rs | 7 |
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 | } |