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.
[ Parent
| on HN ]
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.
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.
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.
Hello from the 10%.
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.
The java slow build time is usually a dependency problem too. On similar complexity, Java is usually as fast or even faster than Rust.
The funny thing is you are also paying at runtime in Java for all the memory management.
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.
Damn. Are you me? I had the same experience.