rust-lang / rust-lang/rust-analyzer

Check walkdir performance under windows

Open
#9,847 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-perf E-has-instructions S-actionable
Dominant language
Rust
Stars
16.9k
Forks
2.2k
Avg merge
1d 12h
Merged PRs (30d)
72

Description

Someone on reddit reports slow startup time on winrows with HDD:

https://old.reddit.com/r/rust/comments/p0z0fa/rustanalyzer_changelog_89/h8dt110/

I don't think we should optimize for HDD, but it makes sense to make sure that we don't do something stupid on windows, as its file system is known to be exciting.

The main disk IO should happen in this function:

https://github.com/matklad/rust-analyzer/blob/5d5d5182c137df293e983d3c3d48869d1c21092c/crates/vfs-notify/src/lib.rs#L175-L213

curiously, we don't do any parallelism whatsoever o_O ?

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

Start in crates/vfs-notify/src/lib.rs around lines 175-213, where the issue identifies the main disk I/O. Reproduce or measure startup and walkdir behavior on Windows, particularly with an HDD, then compare the observed work with the reported lack of parallelism. Done should establish whether the Windows path performs unnecessary work and provide evidence for any focused fix.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
devtools, operating-systems, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.