# Blueprint compile time progressively increases over time

**URL:** <https://forums.unrealengine.com/t/blueprint-compile-time-progressively-increases-over-time/1901556>\
**Category:** Blueprint\
**Tags:** unreal-engine, Blueprint, question\
**Created:** [June 13, 2024, 10:45am UTC](https://forums.unrealengine.com/t/blueprint-compile-time-progressively-increases-over-time/1901556 "2024-06-13T10:45:52Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![Alfamonk](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Alfamonk](https://forums.unrealengine.com/u/Alfamonk)\
**Post date:** [June 17, 2024, 10:14am UTC](https://forums.unrealengine.com/t/blueprint-compile-time-progressively-increases-over-time/1901556/22 "2024-06-17T10:14:58Z")

</div>

Thanks for your help Raven, really appreciate it!

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [June 17, 2024, 10:34am UTC](https://forums.unrealengine.com/t/blueprint-compile-time-progressively-increases-over-time/1901556/23 "2024-06-17T10:34:08Z")

</div>

No worries 🙂

The main ways to separate assets and keep things modular are

Interfaces  
Soft references  
Blueprint inheritance

---

<div class="post-metadata">

**Author:** ![Alfamonk](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Alfamonk](https://forums.unrealengine.com/u/Alfamonk)\
**Post date:** [June 17, 2024, 3:24pm UTC](https://forums.unrealengine.com/t/blueprint-compile-time-progressively-increases-over-time/1901556/24 "2024-06-17T15:24:36Z")

</div>

Thanks Ocean.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/7/a/47ad845bd92f3970af2a2873b27bf36f9e776be4.png)

There’s one more thing tho.

I’ve asked GPT and he told me that somehow the direct references that impacts the size of bp\_player (2.6gb as in the SS above) are those on the right in the size map (I am not talking about reference viewer). I’ve marked them (red) in this SS.

I’ve got rid of a lot of those but now I have somewhere around 2.2GB and nothing too much size-wise on the right.

Do you have any idea how can I find the references that takes up so much memory?

Thank you

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [June 17, 2024, 4:02pm UTC](https://forums.unrealengine.com/t/blueprint-compile-time-progressively-increases-over-time/1901556/25 "2024-06-17T16:02:16Z")

</div>

The main hitters size wise are  
AC\_Inventory 1.4 gb  
Ui\_ItemSystem 1.4 gb  
AC\_CurrencySystem 1.4 gb  
Ui\_CurrencyDrop 1.4 gb  
F\_Equipment 1.1 gb  
Ac\_EquipmentHandler 1.1 gb  
Bp\_sharedfunctions 1.1 gb

Try checking these blueprints with the reference viewer.  
You probably have these systems cross referencing each other causing bloat in all of them.

Check which one has the most hard references and try optimizing it with soft references.

Also whtly does the character contain a dungeon plate? Break with interdependency with an interface. Equipment like shields also shouldnt be hard referenced.

Have a component to handle equipment and spawn and occupy weak pointers as needed.

---

<div class="post-metadata">

**Author:** ![Alfamonk](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Alfamonk](https://forums.unrealengine.com/u/Alfamonk)\
**Post date:** [June 17, 2024, 4:26pm UTC](https://forums.unrealengine.com/t/blueprint-compile-time-progressively-increases-over-time/1901556/26 "2024-06-17T16:26:52Z")

</div>

Yes, regarding the dungeon plate I simply placed in on the character to see something, I do have a lot of equipment which is handled by a component.  
I’ve also completely removed the Ac\_EquipmentHandler to see if the bp\_player size drops and still nothing.

I will dive right now in what you’ve said here and come back with feedback.

Thank you

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [June 17, 2024, 7:52pm UTC](https://forums.unrealengine.com/t/blueprint-compile-time-progressively-increases-over-time/1901556/27 "2024-06-17T19:52:41Z")

</div>

I thought soft refs just weren’t shown in the size map, apparently they’re grey? Can’t check right now.

There’s still a way to go. Because soft or not, your player needs to be lightweight ( well, everything does ). This means trying to remove any coupling between your player and other objects.

You seem to have done everything in the controller and then referenced it in the player.

If you talk to the controller with an interface ( rather than casting ), that will at least get it out of the character.

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [June 17, 2024, 8:14pm UTC](https://forums.unrealengine.com/t/blueprint-compile-time-progressively-increases-over-time/1901556/28 "2024-06-17T20:14:01Z")

</div>

Adding to ClockWorkOcean’s suggestions to make the character lighter I would suggest looking into PrimaryDataAssets to drive any extra actors / mesh components that can interact with the actor (equipment, clothes etc). Keep them lightweight and build them at runtime through data instead of making multiple copies of variants.

OFC decouple them as well and interact through interfaces.

---

<div class="post-metadata">

**Author:** ![Alfamonk](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Alfamonk](https://forums.unrealengine.com/u/Alfamonk)\
**Post date:** [June 20, 2024, 9:54pm UTC](https://forums.unrealengine.com/t/blueprint-compile-time-progressively-increases-over-time/1901556/29 "2024-06-20T21:54:57Z")

</div>

@ClockworkOcean @3dRaven Hey again guys.  
So, Ocean, I’ve deleted the casts to my player controller inside bp\_player to see if anything changes inside size map but nothing happens.

Also, I’ve tried to create lots of soft references and the size keeps getting lower and lower.  
However, I don’t understand inside Size Map why does memory size went down from 2.3 to 1.9gb while the Disk Size went down only from 2.5 to 2.4.

Is the Memory Size the one that’s more important? Can I keep going like this?

Raven, I didn’t quite analyzed PrimaryDataAssets, I have no idea what they do, I do work with Data Tables if that makes any sense or it has absolutely nothing to do with primarydataassets.

Thank you.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [June 21, 2024, 7:30am UTC](https://forums.unrealengine.com/t/blueprint-compile-time-progressively-increases-over-time/1901556/30 "2024-06-21T07:30:11Z")

</div>

> [@Alfamonk](#):
>
> deleted the casts to my player controller

Good first step. You should see no player controller in the character size map when you get it right.

So, to be clear, all the player controller stuff should look something like

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/9/e/a9ec3436cb635fbad3fabd3e36985e58dce374d8.png)

Of course, you can have parameters and return values with interfaces.

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [June 21, 2024, 9:04am UTC](https://forums.unrealengine.com/t/blueprint-compile-time-progressively-increases-over-time/1901556/31 "2024-06-21T09:04:42Z")

</div>

> [@How do I distinguish between Datatable and PrimaryDataAsset？](https://forums.unrealengine.com/t/how-do-i-distinguish-between-datatable-and-primarydataasset/759514/2):
>
> Primary Data Assets, Structures, and Data Tables in Unreal Engine are all used to store data and make it reusable. However, each has a specific purpose and use case: Structures: A Structure is a collection of variables that can be used to store related data. Structures can be used to pass data between blueprints, or to create custom variables that can be used in multiple places. Data Tables: Data Tables are similar to Structures, but they allow you to store multiple instances of data in a tabl…

Here is a good summary of the differences between datatables, structs and primary data assets.

Ofc the documentation also has a description.

---

<div class="post-metadata">

**Author:** ![Alfamonk](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Alfamonk](https://forums.unrealengine.com/u/Alfamonk)\
**Post date:** [June 24, 2024, 11:32am UTC](https://forums.unrealengine.com/t/blueprint-compile-time-progressively-increases-over-time/1901556/32 "2024-06-24T11:32:52Z")

</div>

Hey Ocean,

Do you have any idea why does the size map is not decreasing after deleting those player controller casts?

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [June 24, 2024, 12:05pm UTC](https://forums.unrealengine.com/t/blueprint-compile-time-progressively-increases-over-time/1901556/33 "2024-06-24T12:05:10Z")

</div>

I think you left soft refs to the controller, right? Hence the light blue tinge.

I think the only way to get rid of it totally, is to talk to it with an interface.

---

<div class="post-metadata">

**Author:** ![Alfamonk](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Alfamonk](https://forums.unrealengine.com/u/Alfamonk)\
**Post date:** [June 24, 2024, 10:00pm UTC](https://forums.unrealengine.com/t/blueprint-compile-time-progressively-increases-over-time/1901556/34 "2024-06-24T22:00:20Z")

</div>

Ok I will take a look into that, thank you.

Could you please tell me the ideal size bp\_player should have? (memory\_size)

So I can keep decreasing it up until that sweet spot.

Thank you.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [June 25, 2024, 6:53am UTC](https://forums.unrealengine.com/t/blueprint-compile-time-progressively-increases-over-time/1901556/35 "2024-06-25T06:53:32Z")

</div>

Well, as we can see above, the standard player is 30MB 🙂

You do have a lot to do, I’m afraid, because once you get the controller out of the player, you still have the problem that the controller is huge ( and the equipment handler ).

You are moving into the next level of dev concepts, and there is a bit of ‘hump’ here… 🕶

---

<div class="post-metadata">

**Author:** ![Alfamonk](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Alfamonk](https://forums.unrealengine.com/u/Alfamonk)\
**Post date:** [June 25, 2024, 10:31am UTC](https://forums.unrealengine.com/t/blueprint-compile-time-progressively-increases-over-time/1901556/36 "2024-06-25T10:31:49Z")

</div>

Ook, so, If i understand this correctly I have to reduce the size for playercontroller itself, equipment handler itself and so on.

First of all I’ve noticed that the size map of equipment handler, player controller and maaany other blueprints it’s exactly the same as the bp\_player’s.  
As soon as I remove/create soft ref of anything inside the player, both playercontroller, equipment handler and the other blueprints decreases in size, which I think it’s a good thing… right?  
So, that means that somehow they might communicate through something.  
Anyways, I will 110% find how they communicate and reduce their size.  
Thank you again.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [June 25, 2024, 10:43am UTC](https://forums.unrealengine.com/t/blueprint-compile-time-progressively-increases-over-time/1901556/37 "2024-06-25T10:43:08Z")

</div>

> [@Alfamonk](#):
>
> the size map of equipment handler, player controller and maaany other blueprints it’s exactly the same as the bp\_player’s

That’s because the PC is _in_ the player at the moment 🙂

The problem still remains that the controller will be loaded with the player ( it always is ), but you probably only need some things in the controller some of the time. Same with the handler. But you have it all loaded all the time.

Can you show me a size map on the PC and the handler separately?

---

<div class="post-metadata">

**Author:** ![Alfamonk](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Alfamonk](https://forums.unrealengine.com/u/Alfamonk)\
**Post date:** [June 25, 2024, 10:48am UTC](https://forums.unrealengine.com/t/blueprint-compile-time-progressively-increases-over-time/1901556/38 "2024-06-25T10:48:39Z")

</div>

Sure, I will also share the player’s one.

So, as you can see, I’ve reduced the size down to 845mb and counting (please do keep in mind that this is Memory Size)

 ![1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/9/4/b94579a442a01dd126a12a7651831925827bce82.jpeg)  
 ![2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/8/b/38b03e121db049e98581375ad854081adc03b3d6.jpeg)  
 ![3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/a/9/6a9e479867b7574668704d81f85e82b7130b61fe.jpeg)

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [June 25, 2024, 11:37am UTC](https://forums.unrealengine.com/t/blueprint-compile-time-progressively-increases-over-time/1901556/39 "2024-06-25T11:37:27Z")

</div>

Ok, interesting…

So the controller is out of the player :), that’s because you used an interface

I see the equipment handler features heavily in the controller. That might easy to remove? That will get the controller under wraps.

---

<div class="post-metadata">

**Author:** ![Alfamonk](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Alfamonk](https://forums.unrealengine.com/u/Alfamonk)\
**Post date:** [June 25, 2024, 11:59am UTC](https://forums.unrealengine.com/t/blueprint-compile-time-progressively-increases-over-time/1901556/40 "2024-06-25T11:59:39Z")

</div>

![4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/3/a/03a399a6b95123d3ce7aac9f690f669bdd87537f.jpeg)  
Actually, I didn’t create any interfaces.  
Something it’s strange…

Regarding the removal of the equipment handler, I don’t really want to remove it since that’s how I am handling equipment (perhaps I can use an interface like you said)  
I’ve looked into reference viewer inside PC and again… very strange thing that I do not see Equipment handler… I honestly don’t understand this.  
Could this mean that PC communicates with equipment handler through a component or something like that?

I do still have the player’s controller under bp\_player (marked with red in SS) but it’s size is 236.7MB.  
However, if I click on size maps, directly onto PC, then it’s size is 812.3 (the same as the player’s).This is the second thing that I do not understsand.

Everything I did since my very first post was to create lots and lots of soft references only on bp\_player.

Can this be considered a good practice? to continue creating lots of soft refs on bp\_player until I get it under 100mb and automatically the other blueprints will get under 100mb aswell? (including PC, equipment handler and so on)

Thank you

 ![5](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/f/5/af5f42f4d5e51a6d95c33cc5823f45c13b14fdc7.png)

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [June 25, 2024, 12:06pm UTC](https://forums.unrealengine.com/t/blueprint-compile-time-progressively-increases-over-time/1901556/41 "2024-06-25T12:06:22Z")

</div>

This is where the connection is between PC and handler

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/6/3/1639c3f340cb07a65f29f80cc03b1aebed241bcc.jpeg)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/d/7/dd7e3ab761d200478dee42a89629909810b0efc4.jpeg)

Soft refs are good, but there is something to be aware of

1. You have to load everything manually

2. If you replace casts with soft refs and then load everything, you’re back where you started, because it’s all loaded 🤣

I prefer no refs. Interface breaks the references.

You can also break refs by becoming aware of when it’s happening and coding differently.

How big is the project? I could take a quick look if you want to put it in google docs ( or something ), and give me a link ( PM if you do that ). But not if it’s 100s of Gigs 🙂

[Previous page](https://forums.unrealengine.com/t/blueprint-compile-time-progressively-increases-over-time/1901556.md?page=1)

[Next page](https://forums.unrealengine.com/t/blueprint-compile-time-progressively-increases-over-time/1901556.md?page=3)
