From 3aaf07b8cb9a17669894db9f3e6afdb302676fdb Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Thu, 10 Jun 2021 23:03:16 +0300 Subject: Add more profiling for flyimports --- crates/ide_db/src/symbol_index.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'crates/ide_db') diff --git a/crates/ide_db/src/symbol_index.rs b/crates/ide_db/src/symbol_index.rs index 5c372a7e5..000f87a85 100644 --- a/crates/ide_db/src/symbol_index.rs +++ b/crates/ide_db/src/symbol_index.rs @@ -197,6 +197,7 @@ pub fn world_symbols(db: &RootDatabase, query: Query) -> Vec { } pub fn crate_symbols(db: &RootDatabase, krate: CrateId, query: Query) -> Vec { + let _p = profile::span("crate_symbols").detail(|| format!("{:?}", query)); // FIXME(#4842): This now depends on CrateDefMap, why not build the entire symbol index from // that instead? @@ -321,6 +322,7 @@ impl SymbolIndex { impl Query { pub(crate) fn search(self, indices: &[&SymbolIndex]) -> Vec { + let _p = profile::span("symbol_index::Query::search"); let mut op = fst::map::OpBuilder::new(); for file_symbols in indices.iter() { let automaton = fst::automaton::Subsequence::new(&self.lowercased); -- cgit v1.2.3