rust-analyzer: Stuck at roots scanning in vscode, and memory usage increase over time

rust

I noticed a huge memory consumption of rust anaylzer after recent update, it even cause oom after minutes of use.

In addtion, I noticed a lot of rust-analyzer process(with different pid), they use most(about 70%) of the memory on the system.

Is it normal?

I have Intel i5-1240p, with 16GB of memory on fedora 38(kde spin).

[]$ rustc -V
rustc 1.70.0 (90c541806 2023-05-31)

rust-analyzer version: rust-analyzer version: 0.3.1623-standalone

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 17 (7 by maintainers)

Most upvoted comments

By bisection I meant downloading various releases from GitHub (you can get either the VSIX or the binary, if analysis-stats reproduces the issue, which it doesn’t appear to), to see which release introduced the problem. Then you could also bisect on the git repository, but it’s a little more complex.

The extension bisection feature in Code is different, it helps you identify problematic extensions without disabling them one by one.

I know it doesn’t work on all platforms, but we should probably always measure the memory usage.