Yesterday RustRover became so unresponsive that the UI would freeze for more than 15 seconds (as reported by their exception notifications) and completions would take 5 seconds to appear and be wrong or lacking most times.
I was seriously doubting the internal Rust engine (they don’t use rust-analyzer or LSP), so I switched to VSCode with the rust-analyzer extension, and the same happened there too, although no freezing. Turns out some of my types were 80k characters long, and ‘cargo clippy’ was taking ~900 seconds of one core pegged at 100% for rustc. Oops.
Now I know what they mean when complaining about super long compile times on Rust, and I wasn’t even doing async :)
A parser with Chumsky. There’s a lexer with logos too, but that’s simple and fast. Chumsy makes you create parsing functions which are chains of other parsing functions, and the types can become insanely long, if you don’t box some of them for erasure.
edit: to elaborate, it’s not that the type name was 80k characters, the type definition itself was, like TypeA<TypeB<TypeC, TypeD>>, TypeB<TypeE, TypeF<TypeG…>>>
I was seriously doubting the internal Rust engine (they don’t use rust-analyzer or LSP), so I switched to VSCode with the rust-analyzer extension, and the same happened there too, although no freezing. Turns out some of my types were 80k characters long, and ‘cargo clippy’ was taking ~900 seconds of one core pegged at 100% for rustc. Oops.
Now I know what they mean when complaining about super long compile times on Rust, and I wasn’t even doing async :)