diff options
author | Aleksey Kladov <[email protected]> | 2019-04-14 21:28:10 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-04-14 23:10:07 +0100 |
commit | c4a5aa45dc480792b24535ee6739a4e9a15e8aa8 (patch) | |
tree | 493f07991c90e033e77e7cba4c13f0f9c10b98f8 /crates/ra_ide_api | |
parent | 06615bd331791a21cfd2e262c5c08949ac9b495b (diff) |
add a couple of profiling points
Diffstat (limited to 'crates/ra_ide_api')
-rw-r--r-- | crates/ra_ide_api/Cargo.toml | 1 | ||||
-rw-r--r-- | crates/ra_ide_api/src/change.rs | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/crates/ra_ide_api/Cargo.toml b/crates/ra_ide_api/Cargo.toml index 45bab4e28..333706c1a 100644 --- a/crates/ra_ide_api/Cargo.toml +++ b/crates/ra_ide_api/Cargo.toml | |||
@@ -23,6 +23,7 @@ ra_syntax = { path = "../ra_syntax" } | |||
23 | ra_text_edit = { path = "../ra_text_edit" } | 23 | ra_text_edit = { path = "../ra_text_edit" } |
24 | ra_db = { path = "../ra_db" } | 24 | ra_db = { path = "../ra_db" } |
25 | ra_fmt = { path = "../ra_fmt" } | 25 | ra_fmt = { path = "../ra_fmt" } |
26 | ra_prof = { path = "../ra_prof" } | ||
26 | hir = { path = "../ra_hir", package = "ra_hir" } | 27 | hir = { path = "../ra_hir", package = "ra_hir" } |
27 | test_utils = { path = "../test_utils" } | 28 | test_utils = { path = "../test_utils" } |
28 | ra_assists = { path = "../ra_assists" } | 29 | ra_assists = { path = "../ra_assists" } |
diff --git a/crates/ra_ide_api/src/change.rs b/crates/ra_ide_api/src/change.rs index a4a086931..5bfdbe7e9 100644 --- a/crates/ra_ide_api/src/change.rs +++ b/crates/ra_ide_api/src/change.rs | |||
@@ -9,6 +9,7 @@ use ra_db::{ | |||
9 | salsa::{Database, SweepStrategy}, | 9 | salsa::{Database, SweepStrategy}, |
10 | }; | 10 | }; |
11 | use ra_syntax::SourceFile; | 11 | use ra_syntax::SourceFile; |
12 | use ra_prof::profile; | ||
12 | use relative_path::RelativePathBuf; | 13 | use relative_path::RelativePathBuf; |
13 | use rayon::prelude::*; | 14 | use rayon::prelude::*; |
14 | 15 | ||
@@ -153,6 +154,7 @@ const GC_COOLDOWN: time::Duration = time::Duration::from_millis(100); | |||
153 | 154 | ||
154 | impl RootDatabase { | 155 | impl RootDatabase { |
155 | pub(crate) fn apply_change(&mut self, change: AnalysisChange) { | 156 | pub(crate) fn apply_change(&mut self, change: AnalysisChange) { |
157 | let _p = profile("RootDatabase::apply_change"); | ||
156 | log::info!("apply_change {:?}", change); | 158 | log::info!("apply_change {:?}", change); |
157 | if !change.new_roots.is_empty() { | 159 | if !change.new_roots.is_empty() { |
158 | let mut local_roots = Vec::clone(&self.local_roots()); | 160 | let mut local_roots = Vec::clone(&self.local_roots()); |