From 6bb06addf8d5100cd1125c40d3dfa5f7613b42c1 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 27 Nov 2018 17:39:58 +0300 Subject: don't use volatile queries "volatile" means "changes every time". That is, all transitive rev-deps of volatile queries will be executed every time. We actually need "dependencies". --- crates/ra_analysis/src/db.rs | 2 +- crates/ra_analysis/src/descriptors/mod.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'crates') diff --git a/crates/ra_analysis/src/db.rs b/crates/ra_analysis/src/db.rs index 418711300..4e34265fb 100644 --- a/crates/ra_analysis/src/db.rs +++ b/crates/ra_analysis/src/db.rs @@ -149,7 +149,7 @@ salsa::query_group! { fn resolve_syntax_ptr(ptr: SyntaxPtr) -> SyntaxNode { type ResolveSyntaxPtrQuery; // Don't retain syntax trees in memory - storage volatile; + storage dependencies; use fn crate::syntax_ptr::resolve_syntax_ptr; } } diff --git a/crates/ra_analysis/src/descriptors/mod.rs b/crates/ra_analysis/src/descriptors/mod.rs index a5e956024..98094d9ee 100644 --- a/crates/ra_analysis/src/descriptors/mod.rs +++ b/crates/ra_analysis/src/descriptors/mod.rs @@ -32,13 +32,13 @@ salsa::query_group! { fn _file_items(file_id: FileId) -> Arc { type FileItemsQuery; - storage volatile; + storage dependencies; use fn module::nameres::file_items; } fn _file_item(file_id: FileId, file_item_id: FileItemId) -> SyntaxNode { type FileItemQuery; - storage volatile; + storage dependencies; use fn module::nameres::file_item; } @@ -57,7 +57,7 @@ salsa::query_group! { fn _fn_syntax(fn_id: FnId) -> FnDefNode { type FnSyntaxQuery; // Don't retain syntax trees in memory - storage volatile; + storage dependencies; use fn function::imp::fn_syntax; } fn _submodules(source: ModuleSource) -> Cancelable>> { -- cgit v1.2.3