mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Merge #8627
8627: Add profiling spans under cargo_to_crate_graph r=lnicola a=lnicola bors r+ Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
This commit is contained in:
commit
e529f73355
4 changed files with 7 additions and 3 deletions
|
@ -322,6 +322,7 @@ impl GlobalState {
|
|||
let loader = &mut self.loader;
|
||||
let mem_docs = &self.mem_docs;
|
||||
let mut load = |path: &AbsPath| {
|
||||
let _p = profile::span("GlobalState::load");
|
||||
let vfs_path = vfs::VfsPath::from(path.to_path_buf());
|
||||
if !mem_docs.contains_key(&vfs_path) {
|
||||
let contents = loader.handle.load_sync(path);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue