Rust analyzer and compilation are very slow. My system is heating up, running out of ram and disk space. I have 8 GB ram.
I use helix editor.
edit: thank you for all your suggestions. I am breaking up the project into smaller crates to see if that makes a difference.
I got the biggest improvements from zram and sccache. With zram my memory usage stays at 90% instead of fully running out when rust-analyzer starts.
mina86@lemmy.wtfEnglish
0·18 days ago- My rule of thumb is at least 2GB of RAM per compilation jobs. Even if you have more cores, the jobs may start swapping or crashing slowing down the build in the end. This may of course depends on the size of the project.
- Disable LTO during development. Is it only when you’re ready to release your binary.
- If your editor doesn’t keep up, disable fancy IDE features such as Rust analyser. Run checks periodically the same way you run test.
