diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-25 16:12:27 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-25 16:12:27 +0000 |
commit | dc5ecf446991c65359cf49d52098fcec5f1a1f68 (patch) | |
tree | ca0ee39e7f1305019954b3a413a06f9431cb6648 /crates/ra_ide_api/src/imp.rs | |
parent | 6df1f71b7d0db209978595dc9be496e7f2ef88ec (diff) | |
parent | f6adb85b681c23b64cc33197eb67d5d7fcf920f0 (diff) |
Merge #643
643: add gc request r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide_api/src/imp.rs')
-rw-r--r-- | crates/ra_ide_api/src/imp.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/ra_ide_api/src/imp.rs b/crates/ra_ide_api/src/imp.rs index 8ecb8b17c..961f7b230 100644 --- a/crates/ra_ide_api/src/imp.rs +++ b/crates/ra_ide_api/src/imp.rs | |||
@@ -72,13 +72,14 @@ impl db::RootDatabase { | |||
72 | self.set_source_root(root_id, Arc::new(source_root)); | 72 | self.set_source_root(root_id, Arc::new(source_root)); |
73 | } | 73 | } |
74 | 74 | ||
75 | #[allow(unused)] | ||
76 | /// Ideally, we should call this function from time to time to collect heavy | 75 | /// Ideally, we should call this function from time to time to collect heavy |
77 | /// syntax trees. However, if we actually do that, everything is recomputed | 76 | /// syntax trees. However, if we actually do that, everything is recomputed |
78 | /// for some reason. Needs investigation. | 77 | /// for some reason. Needs investigation. |
79 | fn gc_syntax_trees(&mut self) { | 78 | pub(crate) fn collect_garbage(&mut self) { |
80 | self.query(ra_db::SourceFileQuery) | 79 | self.query(ra_db::SourceFileQuery) |
81 | .sweep(salsa::SweepStrategy::default().discard_values()); | 80 | .sweep(salsa::SweepStrategy::default().discard_values()); |
81 | self.query(hir::db::HirSourceFileQuery) | ||
82 | .sweep(salsa::SweepStrategy::default().discard_values()); | ||
82 | self.query(hir::db::FileItemsQuery) | 83 | self.query(hir::db::FileItemsQuery) |
83 | .sweep(salsa::SweepStrategy::default().discard_values()); | 84 | .sweep(salsa::SweepStrategy::default().discard_values()); |
84 | self.query(hir::db::FileItemQuery) | 85 | self.query(hir::db::FileItemQuery) |