rust-lang / rust-lang/rust-analyzer

Slow `loading` after go to the definition to generated large file.

Open
#17,688 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-perf C-bug
Dominant language
Rust
Stars
16.9k
Forks
2.2k
Avg merge
1d 12h
Merged PRs (30d)
72

Description

rust-analyzer version: v0.3.2045

rustc version: 1.78.0 (9b00956e5 2024-04-29)

editor or extension: VSCode 1.89.1

relevant settings: all default

repository link: grammers

code snippet to reproduce:

  1. find a type that related to a generated large file
  2. hover on that type, it shows the definition
  3. Ctrl + Click to go to the definition
  4. get back
  5. hover on that type again

Here's the gif:
Jul-25-2024 12-44-03

I also tested, if I only switched to another file without going to the definition, the latency was not that long and was acceptable.

Here's the gif:
Jul-25-2024 12-44-58

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in the grammers repository using a generated large file, following the hover and Ctrl+Click go-to-definition steps in VSCode. Compare the second hover after returning from the definition with the latency after only switching files. Done means the slow loading is identified and improved without regressing the normal file-switching case.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, vscode
Domain
developer-experience, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.