News for hackers. Stuff that matters.
Re:Why is my Rust build so slow? by holoduke on Friday December 31, 2021 @05:38AM (#29746698)
I came from java and compared to that even our slowest rust build time is faster than I have ever experienced in java. I remember we had a Java springboot application who had a buildtime of 8 minutes on my 2015 MacBook. I am so happy I don't have to deal with this anymore.
Re:Why is my Rust build so slow? by xpressvideoz on Friday December 31, 2021 @05:47AM (#29746751)
That's more to do with Spring, not Java. The compilation time of Java is infinitely faster than that of Rust.
Re:Why is my Rust build so slow? by Ygg2 on Friday December 31, 2021 @06:09AM (#29746908)
Well, in this case. It had to do with Warp hitting a regression in compiler.

Spring is one of most if not THE ubiquitous piece of Java software. All Java shop I worked for, had Spring

Comparing Spring+Java to Rust+Warp is imo fair game.

Re:Why is my Rust build so slow? by pjmlp on Saturday January 01, 2022 @05:21AM (#29757154)
Meanwhile others of us have never used Spring in production, I have been on the JEE camp since the BEA and WebSphere 5.1 days.
Re:Why is my Rust build so slow? by dragonelite on Friday December 31, 2021 @06:47AM (#29747139)
For pretty 90 plus % of jobs you're pretty much confined to the Spring ecosystem. Same with C# and asp.net separating the two would be really weird.
Re:Why is my Rust build so slow? by pjmlp on Saturday January 01, 2022 @05:22AM (#29757161)
Hello from the 10%.
Re:Why is my Rust build so slow? by timvisee on Friday December 31, 2021 @07:07AM (#29747272)
Unless you pull in a humongous amount of dependencies, Rust's compilation is still very very fast.

The dependency problem is a whole different issue. Hard to tackle, but it's one that must be solved.

Re:Why is my Rust build so slow? by UtherII on Friday December 31, 2021 @07:17AM (#29747345)
The java slow build time is usually a dependency problem too. On similar complexity, Java is usually as fast or even faster than Rust.
Re:Why is my Rust build so slow? by klysm on Friday December 31, 2021 @10:40AM (#29748982)
The funny thing is you are also paying at runtime in Java for all the memory management.
Re:Why is my Rust build so slow? by lenkite on Saturday January 01, 2022 @07:07PM (#29764268)
Kindly check LOC and number of dependencies of your Java App and then compare with this Rust app. Java compiles damn fast, its all the massive chain of dependencies that people keep pulling with it that is usually the issue. That and lots of annotation processing.

Avoid these things and Java is extremely fast to compile

PS: Also if you are using Maven - leverage Maven Daemon.

PPS: Languages like Go are extremely fast to compile not just because the language is simpler but also because the standard library is so good and deep that deps are not needed.

Re:Why is my Rust build so slow? by Ygg2 on Friday December 31, 2021 @05:45AM (#29746736)
Damn. Are you me? I had the same experience.
Re:Why is my Rust build so slow? by lordfoom on Friday December 31, 2021 @10:33AM (#29748909)
Java refugees represent!