rust-analyzer: Perf regression: r-a can't keep up with editing
Moving https://github.com/rust-analyzer/rust-analyzer/issues/6362#issuecomment-719521303 to a new issue, since it seems to be an unrelated regression.
As of somewhere between 43253c508d990cf9d65a1c68cf5dbec8206db164…cb78c40 Rust-Analyzer became nearly unusable on my laptop (Ryzen 3750H, emacs + lsp-mode, Linux). This manifests as auto-completion takes seconds to show up after I start typing, and when I’m “done” with an edit it slowly chugs through my changed characters one at a time while re-highlighting errors at about a second per character.
Weirdly enough my desktop doesn’t seem to show that behaviour at all, and is basically perfectly fine (Ryzen 3900X, but otherwise similar).
It seems to happen for https://github.com/clux/kube-rs and to a lesser degree https://github.com/hyperium/hyper, but an empty dummy project created by cargo new works fine.
I’ll try to do some more bisecting to see if I can find the cause…
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 17 (11 by maintainers)
I guess we don’t strictly need another thread, but the CrateDefMap computation even for just libcore can block for around 1 second, and we wouldn’t give any feedback for that if we only used the single thread to check how long we’ve spent on it. I’d like to give immediate user feedback for that.
Yeah… applying
to cde7392 makes it perform as well as 518f6d7 (under Emacs 26.3). Obviously that isn’t a true solution in itself, but I guess it indicates that debouncing should help.