IssueRaiser

A Plan for Making Rust Analyzer Faster

Some background context: - For a while, I've been looking at and investigating rust-analyzer performance issues. - @Wilfred, @darichey, and I all work together, and our employer is paying us to improve rust-analyzer's performance over the next 6 months on a full-time basis. We've determined that rust-analyzer's current performance is the biggest issue faced by Rust programmers at our employer. - By listing these issues out, we're not attempting to "lick the cookie" or claim it—it's a lot of work for 3 people, and if anyone gets an issue before we do, please do it! Every rust-analyzer user would benefit with these things happening more quickly. Anyways, here's non-exhaustive (but decently comprehensive!) list of things that we'd like to fix. ## Non-Parallel, Single-Threaded Improvements - Rowan is slower than we'd like. - A few weeks ago, I benchmarked tree construction in Rowan against [syntree](https://github.com/udoprog/syntree/blob/main/benches/comparisons.rs) (a library with a similar API to rowan, but one that doesn’t implement structural sharing) and observed that tree construction is twice as fast as Rowan. - This isn’t the most fair comparison, as Rowan is optimized for editing trees—hence the structural sharing—but a syntax tree library structure with a more contiguous representation of the trees themselves would mean that the initial workspace loading/indexing could be substantially faster. - @CAD97’s work and analysis here is pertinent (h

Posted by davidbarsky on Jun 24, 2024, 4:51 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.2,000 issues0 comments

github (Software)

A Plan for Making Rust Analyzer Faster

davidbarskyJun 24, 2024, 4:51 PM

Some background context: - For a while, I've been looking at and investigating rust-analyzer performance issues. - @Wilfred, @darichey, and I all work together, and our employer is paying us to improve rust-analyzer's performance over the next 6 months on a full-time basis. We've determined that rust-analyzer's current performance is the biggest issue faced by Rust programmers at our employer. - By listing these issues out, we're not attempting to "lick the cookie" or claim it—it's a lot of work for 3 people, and if anyone gets an issue before we do, please do it! Every rust-analyzer user would benefit with these things happening more quickly. Anyways, here's non-exhaustive (but decently comprehensive!) list of things that we'd like to fix. ## Non-Parallel, Single-Threaded Improvements - Rowan is slower than we'd like. - A few weeks ago, I benchmarked tree construction in Rowan against [syntree](https://github.com/udoprog/syntree/blob/main/benches/comparisons.rs) (a library with a similar API to rowan, but one that doesn’t implement structural sharing) and observed that tree construction is twice as fast as Rowan. - This isn’t the most fair comparison, as Rowan is optimized for editing trees—hence the structural sharing—but a syntax tree library structure with a more contiguous representation of the trees themselves would mean that the initial workspace loading/indexing could be substantially faster. - @CAD97’s work and analysis here is pertinent (h

Comments (0)

No comments yet. Start the discussion.

Comment on this issue