Significant Increase in Build Times After Upgrading from JUCE 5 to JUCE 8

Hi,
we recently decided to upgrade JUCE 5 to JUCE 8 in our project. However, we noticed a significant increase in build times. For example, in JUCE 5, the DemoRunner took around 10 seconds to build, whereas in JUCE 8, it takes about a minute on an i7-13700H. Our own project now also takes twice as long to build as before. Is this an expected behavior with JUCE 8, or are there any optimizations we should consider to improve build times?

Thanks in advance!

If you have link time optimization turned on, that can slow down the builds a lot.

In addition to the framework itself, compile time will also increase with C++ versions.
I can’t remember what version could be targeted with JUCE 5, but JUCE 8 calls for C++17 at the minimum.

Here is an illustration on a project, Visual Studio 2022 17.12.4, incremental build (one file modified), no LTO:

C++17: 5.4sec
C++20: 6.0sec
C++23: 6.3sec

And JUCE added a large dependency, namely the HarfBuzz library for text-shaping.

Thank you for your responses!
I have a few more questions regarding build optimization:

  • Is it possible to exclude dependencies like HarfBuzz in Debug builds during development to reduce build times (and then include them again in Release builds)?
  • Has anyone successfully made use of Unity (JUMBO) Build to speed up compilation? I tried compiling the DemoRunner with Unity Build, but it results in errors. (Project Properties->Configuration Properties->Advanced->Enable Unity (JUMBO) Build)
  • Does anyone have a comparison between Projucer and CMake in terms of build times? Would switching from Projucer to CMake significantly reduce build times?