aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_ide_api/Cargo.toml1
-rw-r--r--crates/ra_ide_api/src/change.rs2
-rw-r--r--crates/ra_lsp_server/src/main_loop/handlers.rs3
3 files changed, 6 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" }
23ra_text_edit = { path = "../ra_text_edit" } 23ra_text_edit = { path = "../ra_text_edit" }
24ra_db = { path = "../ra_db" } 24ra_db = { path = "../ra_db" }
25ra_fmt = { path = "../ra_fmt" } 25ra_fmt = { path = "../ra_fmt" }
26ra_prof = { path = "../ra_prof" }
26hir = { path = "../ra_hir", package = "ra_hir" } 27hir = { path = "../ra_hir", package = "ra_hir" }
27test_utils = { path = "../test_utils" } 28test_utils = { path = "../test_utils" }
28ra_assists = { path = "../ra_assists" } 29ra_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};
11use ra_syntax::SourceFile; 11use ra_syntax::SourceFile;
12use ra_prof::profile;
12use relative_path::RelativePathBuf; 13use relative_path::RelativePathBuf;
13use rayon::prelude::*; 14use rayon::prelude::*;
14 15
@@ -153,6 +154,7 @@ const GC_COOLDOWN: time::Duration = time::Duration::from_millis(100);
153 154
154impl RootDatabase { 155impl 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());
diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs
index 41d1f759f..eb8a53545 100644
--- a/crates/ra_lsp_server/src/main_loop/handlers.rs
+++ b/crates/ra_lsp_server/src/main_loop/handlers.rs
@@ -12,6 +12,7 @@ use ra_ide_api::{
12 AssistId, 12 AssistId,
13}; 13};
14use ra_syntax::{AstNode, SyntaxKind, TextUnit}; 14use ra_syntax::{AstNode, SyntaxKind, TextUnit};
15use ra_prof::profile;
15use rustc_hash::FxHashMap; 16use rustc_hash::FxHashMap;
16use serde::{Serialize, Deserialize}; 17use serde::{Serialize, Deserialize};
17use serde_json::to_value; 18use serde_json::to_value;
@@ -328,6 +329,7 @@ pub fn handle_completion(
328 world: ServerWorld, 329 world: ServerWorld,
329 params: req::CompletionParams, 330 params: req::CompletionParams,
330) -> Result<Option<req::CompletionResponse>> { 331) -> Result<Option<req::CompletionResponse>> {
332 let _p = profile("handle_completion");
331 let position = { 333 let position = {
332 let file_id = params.text_document.try_conv_with(&world)?; 334 let file_id = params.text_document.try_conv_with(&world)?;
333 let line_index = world.analysis().file_line_index(file_id); 335 let line_index = world.analysis().file_line_index(file_id);
@@ -564,6 +566,7 @@ pub fn handle_code_action(
564 world: ServerWorld, 566 world: ServerWorld,
565 params: req::CodeActionParams, 567 params: req::CodeActionParams,
566) -> Result<Option<CodeActionResponse>> { 568) -> Result<Option<CodeActionResponse>> {
569 let _p = profile("handle_code_action");
567 let file_id = params.text_document.try_conv_with(&world)?; 570 let file_id = params.text_document.try_conv_with(&world)?;
568 let line_index = world.analysis().file_line_index(file_id); 571 let line_index = world.analysis().file_line_index(file_id);
569 let range = params.range.conv_with(&line_index); 572 let range = params.range.conv_with(&line_index);