Earlier quoted context omitted.
When I was trying to improve compile time for my game engine, I ended up using compiled size as a proxy measure. Although it is an imperfect correlation, the fact that compiled size is deterministic across build runs and even across builds on different machines makes it easier to work with than wall clock time.
Wait, this is not intuitive at all for me. If the compiler is working harder wouldn't that result in a more compact binary? Maybe I'm thinking too much from an embedded software POV. I suppose the compiler does eventually do IO but IO isn't really the constraint most of the time right?
I made a real-time C/C++/Rust build visualizer
41–50 of 91 posts
Re: I made a real-time C/C++/Rust build visualizer
#42Earlier quoted context omitted.
When I was trying to improve compile time for my game engine, I ended up using compiled size as a proxy measure. Although it is an imperfect correlation, the fact that compiled size is deterministic across build runs and even across builds on different machines makes it easier to work with than wall clock time.
Wait, this is not intuitive at all for me. If the compiler is working harder wouldn't that result in a more compact binary? Maybe I'm thinking too much from an embedded software POV. I suppose the compiler does eventually do IO but IO isn't really the constraint most of the time right?
Re: I made a real-time C/C++/Rust build visualizer
#43That's really cool. Fascinating to think about all the problems that get missed due to poor or missing visualizations like this. I did a lot of work to improve the Mozilla build system a decade ago where I would have loved this tool. Wish they would have said what problem they found.
(OP here) Thanks! My call with the Mozilla engineer was cut short, so we didn't have time to go into detail about what he found, I want to look into it myself.
- Lots of constant-time slowness at the beginning and end of the build
- Dubious parallelism, especially with unified builds
- Cargo being Cargo
Overall it mostly looks like a soup of `make` calls with no particular rhyme or reason. It's a far cry from the ninja example the OP showed in his post.
Re: I made a real-time C/C++/Rust build visualizer
#44Re: I made a real-time C/C++/Rust build visualizer
#45This would have been really useful 6 months ago, when I was trying to figure out what on earth some Jetson tools actually did to build and flash an OS image.
Re: I made a real-time C/C++/Rust build visualizer
#46> Here it is recording the build of a macOS app:
>
At the top of the page, it should be right under the header.
You made a thing, so show the thing. You can waffle on about it later. Just show the thing.
Re: I made a real-time C/C++/Rust build visualizer
#47It visualizes each crate's build, shows the dependencies between them, shows when the initial compilation is done that unblocks dependents, and soon will have link information.
Re: I made a real-time C/C++/Rust build visualizer
#48I am extremely interested in this. I am stuck in an environment with CMake, GCC and Unix Make (no clang, no ninja) and getting detailed information about WHY the build is taking so long is nearly impossible. It's also a bit of a messy build with steps like copying a bunch of files from the source into the build folder. Multiple languages (C, C++, Fortran, Python), custom cmake steps, etc. If this tool can handle that…
Re: I made a real-time C/C++/Rust build visualizer
#49Re: I made a real-time C/C++/Rust build visualizer
#50I am extremely interested in this. I am stuck in an environment with CMake, GCC and Unix Make (no clang, no ninja) and getting detailed information about WHY the build is taking so long is nearly impossible. It's also a bit of a messy build with steps like copying a bunch of files from the source into the build folder. Multiple languages (C, C++, Fortran, Python), custom cmake steps, etc. If this tool can handle that…
There may be times when CMake itself is the bottleneck but it is almost certainly an issue with your dependencies and so on. CMake has many features to assist you in speeding up your compile and link time too. But it would take a series of blog posts to describe how you should try to speed it up.