Download

Speeding Large Blueprint Compile Times

I have a Bleuprint with a fairly large EventGraph that takes a rather long time to compile.

If I refactor a bit into more functions and split it into multiple graphs, will it compile faster?

Or is it simply a matter of the number of nodes in the entire blueprint?

In my experience, it is the number of nodes in the blueprint. Something I have done to solve long compilation times, is convert my functions over to C++ (This also solves memory leak issues I have had in extremely large Blueprints).

I have come to same conclusion - as BP gets rather large compile times really start to take a while due to the number of nodes.

Splitting into graphs/functions seems to have no effect.
I’m gonna have to move a bunch of code and logic down into c++ (at least for this large Hero BP).

The main point of BP for me is fast iteration, and these long compile times are breaking that.

Maybe I need to buy a Threadripper or 10-core 7900x… not sure how much that would help though

Is BP compiling multi-core friendly?

Also - just stumbled on an interesting fact…

If I inherit a new BP off the old slow one, the new one compiles like 20 times faster.

So one approach for keeping fast iteration would be to simply create a new child every time it starts getting slow…

Of course this might lead to quite the tangled inheritance chain mess, so might be better to separate by concern…
e.g.
AttackBP->InventoryBP->TargetingBP

I am still planning to push a bunch of the performance critical stuff into c++ - but at least there is another option to keep the iteration speed fast :slight_smile:

Utilize Actor Components for things such as Inventory, Health, and Targeting. If your blueprint class is fairly large, it may be time to refactor.

But if you create a new child blueprint won’t the parent its attached to just keep on resetting the values in the child?

Refactoring into Components is definitely a good idea - Thanks!

Not sure I follow - each instance has it’s own copies of all the child and parent variables? (The child can access parent variables and/or define new variables if needed - no need to override or replace those in the parent)