rust-analyzer: rust-analyzer is slow to compile
Both ra_hir and ra_ide_api are really slow to compiler, which makes fix & test loop rather frustrating. Note that tests are extremely fast themselves, it’s compile time that hurts us badly.
We need to do something with it…
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 8
- Comments: 58 (57 by maintainers)
Commits related to this issue
- Merge #3584 3584: Switch to dynamic dispatch r=matklad a=matklad Benches are in https://github.com/rust-analyzer/rust-analyzer/issues/1987#issuecomment-598807185 TL;DR: * 33% faster release b... — committed to rust-lang/rust-analyzer by bors[bot] 4 years ago
- Merge #5153 5153: Make SemanticsScope non-generic r=matklad a=lnicola This slightly reduces the build times: .
To things jump at me as odd:
On Wednesday, 1 July 2020, Laurențiu Nicola notifications@github.com wrote:
And the one on GitHub is presumably linked statically (but still stripped).
with
lto=falseit is somewhat faster, but the general picture is the samehttps://gist.github.com/matklad/c80618d9328546ca28f06ebe9022a327
Hm, should we put debug=0 into Cargo.toml? I think I personally can live with that, especially if it makes printf debugging faster 😃
We loose line numbers in backtraces, but I think I rarely look at backtraces (but we should retain debug=1 for releases, so that folks can get a useful backtraces from the debugger).
On the side note, one of the things I miss most from IntelliJ is the ability to colorize and linkify backtraces. If we could link rust::paths from backtraces to functions, that would be sooo helpful.
Hm, that reminds me that we should set debug = 1 for the dev profile, to save some disk space…