Open
Description
Logs output using RA_PROFILE='*>10'
: log1.txt
Logs output using RA_PROFILE='*
: log2.txt
Perf run showing the problem (viewable using Firefox profiler): perf.tar.gz
The first 30s are the indexing time, then rust-analyzer hangs for 75s when trying to hover a struct or go to its definition.
rust-analyzer version: v0.4.2270
rustc version: rustc 1.83.0 (90b35a623 2024-11-26)
editor or extension: VSCode 1.96.3 with rust-analyzer extension v0.4.2270
Reproduction: This problem occurs on a private repository which I cannot share. It uses diesel
extensively.
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
ChayimFriedman2 commentedon Jan 18, 2025
It doesn't seem to hang, just doing a lot of work. Indexing isn't the end of the story; it doesn't do all the work (nor it should). And diesel is known to use the trait solver extensively. So I believe this is unactionable.
Do next hovers also take that long?
stormshield-kg commentedon Jan 18, 2025
Next hovers are fast only if the code doesn't change, but they are slow again after any code modification.
stormshield-kg commentedon Jan 18, 2025
The slowdown didn't occur several months ago, so it might be caused by a relatively recent change in rust-analyzer.
Foorack commentedon May 18, 2025
Running into this as well. Stuck at "Indexing 240/353 (myproj_abc)".
Not sure if it is actually "stuck", or just deeply processing something (RA_LOG=info doesn't help), but this did not happen a few months ago. I'll see if I can rollback the VSCode extension and find the point it degrades.
ChayimFriedman2 commentedon May 18, 2025
@Foorack Yours is probably #19790.