Re:Rust – Faster compilation with the parallel front-end in ...
by the8472 on Friday November 10, 2023 @09:50AM
(#38219521)
That doesn't seem particularly surprising. Lots of software is slow when your storage is slow.
Re:Rust – Faster compilation with the parallel front-end in ...
by eminence32 on Friday November 10, 2023 @11:15AM
(#38220648)
You're right that some slowdown is expected, but for me personally I hadn't realized how bad this particular FS was, nor had I expected how much it impacted build times
Re:Rust – Faster compilation with the parallel front-end in ...
by lolinder on Friday November 10, 2023 @09:54AM
(#38219573)
Wouldn't this be true of any compiler? Do other compilers have optimizations that avoid excess disk usage when on a slow file system?
Re:Rust – Faster compilation with the parallel front-end in ...
by eminence32 on Friday November 10, 2023 @11:03AM
(#38220500)
Yes, I think that's right, but I don't have any data to compare rust to other compilers.
Re:Rust – Faster compilation with the parallel front-end in ...
by ragnese on Friday November 10, 2023 @11:31AM
(#38220866)
I wouldn't be surprised if Rust/Cargo does more disk IO than other build tools, though. Rust does a lot of compile time code gen and caches a lot of stuff on disk.
Re:Rust – Faster compilation with the parallel front-end in ...
by insanitybit on Friday November 10, 2023 @10:31AM
(#38220074)
FWIW we did this to significantly reduce storage usage
strip = "debuginfo"
This was a ~20x reduction in size, 279M -> 19M. If you have slow storage it could really help performance (don't recall, personally).
Re:Rust – Faster compilation with the parallel front-end in ...
by eminence32 on Friday November 10, 2023 @10:57AM
(#38220432)
Good hint, thank you. I'm trying this out and I do see an improvement in performance. The ~23 second build now takes about ~14 seconds
Re:Rust – Faster compilation with the parallel front-end in ...
by insanitybit on Friday November 10, 2023 @12:27PM
(#38221682)
Hell yeah! I'm so glad I could help, that's a big win.
FWIW it does break debuggers since you won't have the symbols. Just comment it out when you need a build that has all of that info.
When using local disks, a 10k LoC project takes ~5 seconds to build
When using network FS, the same project takes ~23 seconds to build