add a couple of profiling points

This commit is contained in:
Aleksey Kladov 2019-04-14 23:28:10 +03:00
parent 06615bd331
commit c4a5aa45dc
4 changed files with 7 additions and 0 deletions

View file

@ -9,6 +9,7 @@ use ra_db::{
salsa::{Database, SweepStrategy},
};
use ra_syntax::SourceFile;
use ra_prof::profile;
use relative_path::RelativePathBuf;
use rayon::prelude::*;
@ -153,6 +154,7 @@ const GC_COOLDOWN: time::Duration = time::Duration::from_millis(100);
impl RootDatabase {
pub(crate) fn apply_change(&mut self, change: AnalysisChange) {
let _p = profile("RootDatabase::apply_change");
log::info!("apply_change {:?}", change);
if !change.new_roots.is_empty() {
let mut local_roots = Vec::clone(&self.local_roots());