mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-31 07:37:30 +00:00
Avoid blocking the main loop when editing Cargo.toml
I've noticed a bunch of "main loop too long" warnings in console when typing in Cargo.toml. Profiling showed that the culprit is `rustc --print cfg` call. I moved it to the background project loading phase, where it belongs. This highlighted a problem: we generally use single `cfg`, while it really should be per crate.
This commit is contained in:
parent
cc963d2b11
commit
add87f5424
5 changed files with 100 additions and 71 deletions
|
@ -5,6 +5,7 @@ mod cfg_flag;
|
|||
mod project_json;
|
||||
mod sysroot;
|
||||
mod workspace;
|
||||
mod rustc_cfg;
|
||||
|
||||
use std::{
|
||||
fs::{read_dir, ReadDir},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue