this post was submitted on 06 Mar 2026
25 points (100.0% liked)

Rust

7860 readers
33 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 2 years ago
MODERATORS
 

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.

you are viewing a single comment's thread
view the rest of the comments
[–] silly_goose@lemmy.today 3 points 1 week ago (2 children)

My system has a midrange amd cpu with 6 cores. I have an ssd.

I think the issue has to do with procedural macros in maud. The project is about 1000 dependencies and 10k loc.

Combined with tailwind classes and a complex ui, the templates get bloated. I have to test this theory.

[–] INeedMana@piefed.zip 2 points 6 days ago

The project is about 1000 dependencies and 10k loc

To me that's a very big project. Have you tried using fewer compilation threads? Maybe you need to sacrifice some speed to make it fit in memory and disk?

[–] sga@piefed.social 4 points 1 week ago (1 children)

1000 dependencies

that is too much. i use something with 900ish, and even withh cached builds, it takes like 20 mins, we just have too much linking going on

[–] TehPers@beehaw.org 5 points 1 week ago (1 children)

Couldn't agree more here, 1k dependencies would take a while to build even on my 9950x3d if only due to linking.

It seems to me like the the issue is the project is either too bloated, or large enough to justify a workstation build. Breaking it into smaller, independent parts would also help here.

[–] silly_goose@lemmy.today 1 points 1 week ago

Thanks that's a great idea. I will try breaking it up into crates.