Executable Size Increase from version 7.0.2. to 8.0.8

The executable size has increased about 50% after updating from JUCE 7.0.2 to 8.0.8. I also updated from MS Visual Studio 2019 to 2022. Does anybody have any ideas what could have caused this? I’m including the same JUCE library modules as those from version 7.0.2.

try dumpbin.exe and see if it offers any clues?

A little more information might be useful. What modules are you including? what was the absolute size before and after? I think absolutes are probably more important than relatives. Have you tried creating a simple project and gradually taking modules away to see if you can find any obvious culprits?

I haven’t tried a simple project yet.

Size before: 16,420 kb

Size after: 24,665 kb

Included modules:

juce_audio_basics

juce_audio_devices

juce_audio_formats

juce_audio_processors

juce_audio_utils

juce_core

juce_cryptography

juce_audio_data_structures

juce_events

juce_graphics

juce_gui_basics

juce_extra

juce_opengl

juce_product_unlocking

juce_video

Thanks, just to clarify a couple of things

  • I’m assuming this is a release build? if it’s not please try a release build
  • I’m assuming by kb you mean Kilobytes (KB or kB) and not Kilobits (kb)?

I was on macOS so I checked there first, in summary I’m not seeing anything jumping out to me that would suggest the kind of increase you’re describing. Therefore it’s likely non cross platform code or a third party dependency. For example on Windows there is now the D2D renderer so maybe this is where the increase is coming from?

For my tests I created a console app and gradually added each module (I had to add these strategically so as to avoid adding a module whose dependencies hadn’t already been added). After adding each module I measured the release binary size and compared the results between JUCE 7.0.12 and the current develop branch.

Some modules decreased, most increased by small amounts, and a couple increased by larger amounts. In total the increase on macOS was ~46.5KB (the modules you specified).

If the size of the binary on Windows is a big concern for you, one thing you could consider is dynamically linking the runtime libraries.

I’m interested to know what is causing the increase for you but I can’t guarantee there will be an awful lot we can do, especially if that increase does turn out to be due to third party dependencies.

Thank you for your help.

Yes, I did mean kilobytes.

This is a debug build and the version from the earlier version of JUCE I’m comparing it to is also a debug build and both are statically linked. I could try a release build but the question would remain for the debug build.

Also, keep in mind I am using MS Visual Studio 2022 where I was using the 2019 version before. I’m not using any 3rd party software but maybe the new version of Visual Studio (2022 vs 2019 previously) is including things I don’t know about.

The larger size is not really a problem but I just wanted to know if I’m doing something wrong with the newer version of JUCE that’s causing this. If it’s just because the new JUCE modules are larger it’s not a problem.

I think for a debug build I’m not overly concerned. It’s very likely due to an increase in module size because of additional dependencies. Hopefully that translates to less of an increase for a release build for you. Notable dependencies added in JUCE 8 that seem likely culprits would be HarfBuzz and Direct2D.

1 Like