diff options
Diffstat (limited to 'crates/ra_ide_db/src/change.rs')
-rw-r--r-- | crates/ra_ide_db/src/change.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_ide_db/src/change.rs b/crates/ra_ide_db/src/change.rs index b13df8b85..7a4e04ca9 100644 --- a/crates/ra_ide_db/src/change.rs +++ b/crates/ra_ide_db/src/change.rs | |||
@@ -3,11 +3,11 @@ | |||
3 | 3 | ||
4 | use std::{fmt, sync::Arc, time}; | 4 | use std::{fmt, sync::Arc, time}; |
5 | 5 | ||
6 | use profile::{memory_usage, Bytes}; | ||
6 | use ra_db::{ | 7 | use ra_db::{ |
7 | salsa::{Database, Durability, SweepStrategy}, | 8 | salsa::{Database, Durability, SweepStrategy}, |
8 | CrateGraph, FileId, SourceDatabase, SourceDatabaseExt, SourceRoot, SourceRootId, | 9 | CrateGraph, FileId, SourceDatabase, SourceDatabaseExt, SourceRoot, SourceRootId, |
9 | }; | 10 | }; |
10 | use ra_prof::{memory_usage, profile, Bytes}; | ||
11 | use rustc_hash::FxHashSet; | 11 | use rustc_hash::FxHashSet; |
12 | 12 | ||
13 | use crate::{symbol_index::SymbolsDatabase, RootDatabase}; | 13 | use crate::{symbol_index::SymbolsDatabase, RootDatabase}; |
@@ -85,12 +85,12 @@ const GC_COOLDOWN: time::Duration = time::Duration::from_millis(100); | |||
85 | 85 | ||
86 | impl RootDatabase { | 86 | impl RootDatabase { |
87 | pub fn request_cancellation(&mut self) { | 87 | pub fn request_cancellation(&mut self) { |
88 | let _p = profile("RootDatabase::request_cancellation"); | 88 | let _p = profile::span("RootDatabase::request_cancellation"); |
89 | self.salsa_runtime_mut().synthetic_write(Durability::LOW); | 89 | self.salsa_runtime_mut().synthetic_write(Durability::LOW); |
90 | } | 90 | } |
91 | 91 | ||
92 | pub fn apply_change(&mut self, change: AnalysisChange) { | 92 | pub fn apply_change(&mut self, change: AnalysisChange) { |
93 | let _p = profile("RootDatabase::apply_change"); | 93 | let _p = profile::span("RootDatabase::apply_change"); |
94 | self.request_cancellation(); | 94 | self.request_cancellation(); |
95 | log::info!("apply_change {:?}", change); | 95 | log::info!("apply_change {:?}", change); |
96 | if let Some(roots) = change.roots { | 96 | if let Some(roots) = change.roots { |
@@ -141,7 +141,7 @@ impl RootDatabase { | |||
141 | return; | 141 | return; |
142 | } | 142 | } |
143 | 143 | ||
144 | let _p = profile("RootDatabase::collect_garbage"); | 144 | let _p = profile::span("RootDatabase::collect_garbage"); |
145 | self.last_gc = crate::wasm_shims::Instant::now(); | 145 | self.last_gc = crate::wasm_shims::Instant::now(); |
146 | 146 | ||
147 | let sweep = SweepStrategy::default().discard_values().sweep_all_revisions(); | 147 | let sweep = SweepStrategy::default().discard_values().sweep_all_revisions(); |