rust-analyzer icon indicating copy to clipboard operation
rust-analyzer copied to clipboard

Sporadic high cpu usage with prost/tonic

Open cynecx opened this issue 3 years ago • 0 comments

rust-analyzer version: 2b472f6684bb1958274995d12b2c50310d88cc52

rustc version: rustc 1.64.0-nightly (0f4bcadb4 2022-07-30)

Repro repo: https://github.com/cynecx/ra-repro-tonic

I wasn't able to reduce the reproduction further due to time constraints.

How to trigger the bug?

Comment/Uncomment this impl (impl<'a> From<&'a str> for MaybeString):

image

rust-analyzer should spend 100% cpu for several seconds (and therefore blocks ide functionality).

This might be related to chalk since it seems like ra is spending most of the time inside chalk_recursive.

cynecx avatar Aug 02 '22 17:08 cynecx