Longest Release Build Times!

What’s the longest release build times you have experienced with a juce project.

I currently have a project I have let build over night and is still never presenting an error or finish linking the build.

How long is too long?

Do you have Link Time Optimization turn on and not much RAM? That can take a long time.

Otherwise it shouldn’t be more than a few minutes. Look into unity builds.

1 Like

a) Use an SSD
b) Turn off any virus checkers

Try recompiling… is it any faster?

What OS and Compiler are you using?

Rail

We had some scenario where the msvc was hours vs minutes on clang/xcode.

The actual code was some constexpr generated array from templated code.

Ideally you’d like to profile build times to see what takes the unexpected time and causes the compiler to misbehave.

2 Likes

i never made a really big plugin or so but… that sounds like something else went wrong. my release builds might take 5min and my computer is quite old

1 Like

This happened randomly so I updated everything, xcode, sdk’s, and macOS.

Still the same issue…

I am Link Time Optimizing and have 64 gigs of ram :confused:

I also don’t think thermal throttling is causing the issue.

I have deconstructed my project to get it built, and have found something similar with parameter arrays housing structs, and id strings.

The problem I have if profiling on class is difficult since they are so integrated.

It seems to only happen while linking…

It’s hard to find the problem because my older builds seem to no compile to release as well. Here are all my guesses…

Virtual Classes with dynamic casting into arrays

Single Component classes that grab parameters through switch statements.

Or something is being initialized to zero in debug but not release, or the “binaries” are being crossed by different classes accessing the same variables.

It is very difficult to figure out the problem because my builds have been taking anywhere from 8 - 15 minutes. :crazy_face: :melting_face: :woozy_face:

Is it possible my file structure is off?

Is there a “best practice for file structure?”

Holy Shit, it built…

So this was the fix. About a year ago I hired a guy to help build a class.
He used global variables, I have never used global variables.

This was fine with 5 functions and one or two arrays…

10000 lines of user parameters later… This morning I put all the parameters in a struct and then made that struct the parent of all classes that referenced it.

Thank you guys for commenting, it literally built after I responded…

I’m so happy!!!

Screen Shot 2022-10-08 at 10.51.28 AM

1 Like