phaseField icon indicating copy to clipboard operation
phaseField copied to clipboard

Would it be useful to switch to `ninja` instead of `make`

Open landinjm opened this issue 1 year ago • 2 comments

Ninja (https://github.com/ninja-build/ninja) seems like a good alternative to Make for compiling.

The main advantage of this is to reduce compile times when making incremental changes. I am unsure how it would affect the performance. Or if would matter for most users since the compilation time for applications is already quite fast (~1min). It would most likely save time for developers/contributors though.

landinjm avatar Sep 04 '24 14:09 landinjm

Would be worth looking into some more. Compile times added up when I was recently making changes to the equation dependency parsers ( a small change would practically cause the entire library to recompile)

landinjm avatar Sep 21 '24 20:09 landinjm

With 4 threads on my laptop make takes about 144s. Ninja takes about 144s.

That said, it may perform better with more cores. I think it is worth adding documentation for since all you have to do is:

sudo apt install ninja
cmake . -G Ninja
ninja -j n

landinjm avatar Oct 16 '24 21:10 landinjm

The CI has been updated to use ninja.

landinjm avatar Apr 09 '25 16:04 landinjm