Hey guys. As time progressed, my UE5 project is taking longer and longer to load, given I was adding more stuff in it. It was natural and made sense.
When I start my project, I can see it reaches to 95% in like a minute or so. And then stays there for a while displaying various objects that it’s loading.
“95% - Finalizing Load of ______”
This final process used to take like 4-5 mins and then I’m in my project.
Recently, after adding some Face Animations, loading time has increased. (today it was stuck for 15mins on this 95% stage, and took 25 mins in total to open it.)
Is there a way to make this faster? Like to Unmark these objects altogether or skip this loading ?
In these images, “sw_Foley_Jump” is a sound wave file, and “skinned asset m_med_nrw” is a metahuman SK Mesh but idk why is it being “ready” before starting. No idea on this CanvasPanel18. There are always some random objects when it comes to 95% and just prepares them. I’m not even using sw_foley_jump currently. Why waste time loading it?
And it always does this 'Discovering Asset Data" thing in content browser after loading the project. It wasn’t happening before but now it’s more prominent these days.
You can reduce load times with soft references to classes and object and only loading in the reference when needed.
Otherwise if you have hard references each class will automatically load all other classes inside of it and this can happen recursively increasing load times and memory consumption.
I’m using a data table that stores all dialogues as a text, face and body anims of all NPCs. Since DTs are based on structs, can I change the Struct from using hard ref to soft ref? Is this possible ? Can I do this safely given I’ve got a good amount of such DTs
Let’s say I don’t use soft ref and build this game. Will it still have slower load times after build or this is just an editor related thing?
Edit - Is there anything else I must do to reduce load times? apart from soft ref
Not sure if soft references work with struct as there is no pointer when it comes to ustructs, but any references to actors or classes can be converted.
But I’m not using any hard ref to actors or classes. At max, simple variables which are empty inside Blueprints like GameInstance or Level BP, that are only filled when required.
My “hard ref” data is literally this. Voiceover audio, Face Animations, Body Animations etc,.,
I’m guessing it could be a matter of using meta human with all ranges of level of detail. You have many variants of the texture sizes and mesh LOD triangle density.
Sound cues can also be soft referenced if needed.
Unreal also has build in filters. You can select unused assets. Perhaps you have old assets that you are no longer using that are killing load times?
I don’t trust the filters a 100% as sometimes you will load in stuff dynamically.
Always double check if it’s safe to delete an asset with the reference viewer first.
I tried RefViewer on GameMode/GameInstance and the only sense I can make is that, it’s the Data Tables which have hard refs for all Dialogues, Face Anims Body Anims etc. The more I add in them, the slower the game loads.
I was thinking that. I can also use Soft Ref for Animations too I guess?
I just hope it doesn’t break the Data Table or any other code that uses this data.
Dialog is understandable that it could be heavy size wise so only loading a batch before a decision would be wise.
Animations on the other hand are usually small files and need to be called on quickly so there isn’t that much time to async load them unless they are for instance only for a one time cut-scene.
Yes but like I said in my actual post, when UE loads, it says (while on 95%) that it’s loading the Face Anims and Dialogue Audio files. I cannot delete them. They literally are the meat and potatoes of my game. So there’s no way out?
I get that but this will mean modifying almost all of my Blueprints that even remotely use the Data Tables. UI, NPCs, SoundClasses etc all do fetch the DT at some point. Too much work.
This might let you narrow down what is the most bloated in your project.
Perhaps you could change sound compression or reduce textures if they are 8k (4k is more than enough and for most 2k is fine)
Yo I have a question regarding this image.
You are using 2 nodes, one is to Async load the asset other is casting to it’s actual parent class type. Isn’t this affecting performance if we are casting for all the objects in this way?
So on a neutral standpoint, given you have seen my Data Tables, shall I try switching all the Anims+Dialogue Audio slots in DT from hard ref to soft ref? Will it help?
Also I tried Size Mapping my Game Instance and all these Data tables that I load before hand are consuming a lot of disk space around 20+ gigs and around 5 gigs of RAM.
I feel this Fn is the culprit. Can you help me with a more efficient way of loading DTs according to Chapter/Segments? I really feel if I optimize this, step a lot of things will be smoother.
Here is the Disk Size Map (please don’t judge me lol)