News for hackers. Stuff that matters.
Re:Why is my Rust build so slow? by gameswithgo on Friday December 31, 2021 @07:15AM (#29747333)
Yes, a slow compiletime of a dependency is less painful since you don’t do full recompiles that often, but things can spiral out of control if you have say 50 dependencies and many of them are real slow and you are on your old dual core laptop and find it takes hours, and so on.
Re:Why is my Rust build so slow? by ModernMech on Friday December 31, 2021 @09:00AM (#29748085)
Hold up, this is some severe goalpost moving. I realize these comments are coming from different people, but this thread started at:

“tribal knowledge required to bypass it, so early in the the life of a programming language, is a really bad sign.”

and within a few replies we ended at (paraphrasing):

“Granted compilation time is incremental, libraries are only compiled once, debug mode is much faster, but it’s really going to be an issue with a huge project on absurdly obsolete hardware.”

As the author of a project that relies on 50+ projects with some massive dependencies (wgpu, Tokio, rayon), yes it can take a good long while to compile from scratch, but it’s not “hours”, and after first compile that’s all paid for going forward.

Honestly this all seems like grasping at one of Rust’s perceived weak points, but really there are so many better criticisms, I don’t know why compile time gets so much attention.

Re:Why is my Rust build so slow? by pjmlp on Friday December 31, 2021 @09:25AM (#29748313)
Mainly because not everyone is willing to buy a last generation threadripper to have the same workflow as apt/yum/rpm/NuGet install libXXX-dev + make.
Re:Why is my Rust build so slow? by ModernMech on Friday December 31, 2021 @09:39AM (#29748414)
Including me! There’s a lot of daylight between “an old dual core laptop” and a last gen thread ripper. For example, I’m running on a quad core i7 from 2015.
Re:Why is my Rust build so slow? by pjmlp on Friday December 31, 2021 @09:52AM (#29748524)
My old dual core laptop from 2009 works just fine with Visual Studio 2022, even though I wasn't the OP.

And long compile times kill the battery on the go, and cargo check hardly helps when writing GUI code.

Re:Why is my Rust build so slow? by ModernMech on Friday December 31, 2021 @12:20PM (#29750112)
I don’t think I follow the point you’re trying make. Are you trying to say Rust compile times are a problem for you on your 13 year old laptop in the context of writing GUI code on battery? If so I think that’s such a specific scenario that it’s hard to draw any generally applicable conclusions.
Re:Why is my Rust build so slow? by pjmlp on Friday December 31, 2021 @03:24PM (#29752179)
I also own devices like laptop graphics workstations.

The point I am making is Rust only for those with enough income to buy hardware powerful enough to have a usable workflow or for anyone regardless of what hardware they can afford?

As for coding on the go, classical desktops are a dying breed.

Re:Why is my Rust build so slow? by mlindner on Wednesday January 05, 2022 @07:22AM (#29808084)
Your laptop from 2009 predates even Rust's earliest stable version by 6 years. Including computers that are older than the language itself is completely unreasonable.