Play in editor takes over 10 minutes to start

Hi, I updated to 2.12 from 2.11 and now my game takes ages to start running. Granted this is mainly a procedural game and is made (at the moment) exclusively with blueprints, however, I did not have this problem in the prior version (although it would take a few secs). I noted that it takes a long time on the first begin play (up to 10 minutes), but then subsequent ‘play in editor’ clicks are much faster.
Is there an aspect of the engine compiling blueprints ? Also any tips on how I can decrease this time/dependency issue, i.e. would BP interfaces help? Is this a case of all BP’s need to be checked (there are a few large BP’s that are heavily interconnected).
Thanks
Ben

Hi ,

  • How many actors do you have rendered or spawned into the scene on begin play?
  • Can you post your dxdiag here so I can take a look?
  • Are you spawning instanced meshes, hierarchical meshes, or static meshes?
  • Do you see a memory use increase in task manager when you start PIE?

Hi ,
There are no actors actually spawned per-say, instead there is a lot of blueprint communication, and a fair amount of passing information (only really tech tree information/checking). I am not spawning anything currently, I think its more a case of heavy blueprints that need to recompile when the editor first starts and they form a loop? Especially since the speed of subsequent PIE’s are much faster when the first PIE is finally entered (10/20 minutes vs literally seconds). Maybe there is a long loop in my game for no reason? The editor doesn’t crash, and I get about 30% cpu for a long time.

The memory starts at 2551mb, and ends at 2783mb.

I also have another (related) map which does not have any of the passing of information (no tech tree), but still has large wait times. These blueprints are modified versions of the others from before. There may also be an issue with the amount of blueprints I have which inherit from each other, but this doesn’t explain why 2nd PIE is really fast in comparison.

. [link text][1]
[1]: 99089-dxdiag.txt (44.6 KB)

Thank your for your time
Ben

Try compiling all of your blueprints before ever starting PIE. This may take some time, but afterwards, save everything, restart your editor, then press PIE. Do you see any difference in how long it takes to load?

I recompiled one blueprint (which a lot of BP’s inherit from ( many 100’s)), and it took the same long time, the HUD/camera/ other big logic BP’s too a lot less time. I have made a lot of the BPs to inherit from the class “Building”, and will add meshes later. Given that its an RTS I need to have this setup really as inheritance is needed. Is there anyway to sort this and not have huge waits ?

Would converting the slow BP to C++ make this quicker in the future ? Also, now that I think about it would a Blueprint interface be helpful if the parent class was removed and then only the needed shared functions were added via the interface ?
Thanks

Unfortunately there is no way around it. All blueprints that are dirty will need to be compiled, or it will continue to try and compile them each time the editor is opened. Running through a compile will take time, but should save you time later on future PIE builds. It is recommended to compile a blueprint after changes are made each time to prevent this from occurring in the future.

Hi ,

Unfortunately I do not believe either option is going to reduce the amount of time necessary to fix this error. Both blueprints and C++ require compilation, and c++ often, depending upon how large the .cpp/.h files are, requires a longer compile time than blueprints. Additionally, while interfaces provide a great way to pass functionality between actors for blueprint communication, any changes to a blueprint are still going to require compilation, with or without the interface. It may help to alleviate blueprint compilation across blueprints that are simply accessing messages, but the initial blueprint will still need to be compiled. The best case scenario right now will be to compile everything. Once you get this out of the way, compiling after changes are made to a blueprint and before saving should save you a significant amount of time in the future. Once this is done, please let me know if it helped to alleviate your error or if the slow down persists afterwards, as that may indicate a separate issue that needs to be addressed.

If I compile all the blueprints (On PIE) then the next PIE sessions are quick again. However if I restart the editor the first PIE again takes ages. It did not do this on the last version, and I have in no way changed the large blueprint. Why is this now a problem ?

1 Like

Check your blueprints to see if you have any circular dependencies. These often will cause errors in which multiple blueprints require constant compiling and would cause an error similar to what you are seeing in large quantities.

I think there are circular dependencies in some Bp, but in the one which inherits many BPs I do not think there are any circular dependencies (this one is the one that takes a long time to compile). I also doubt that circular dependencies are possible to remove in my project, many of the tutorials ive read (even from epic) have circular dependencies?

Can you send me a copy of your project so I can take a look and see what may be occurring?

I have uploaded it to my google drive and you can download it. I have sent you a direct message on the forum. Thanks

Hi ,

I tested your project and did not see the same errors you have mentioned. There was no slowdown, freeze, or lengthy start time for the project on PIE, though I saw a number of access none errors that do need to be addressed.

What other steps can I take to reproduce this on my end?

Hi ,
I added a blueprint interface between the big BP which all inherited from (I was casting previously) and I think that sorted it, but I swear when I first made it there was still a large wait.
When you start the game did you get an error saying that BPs needed compiling ? I re-hooked up a load of pins as they broke (when updating from last version). I though that this (separate) bug was fixed as ive seen it on the asnwerhub before (as it was an issue) ? However, I just saved the project and when I reopened they were all disconnected again (after i re-hooked them up a few mins ago)! You can view this if you switch the map to untitled and the keep the game mode the same but change the pawn to RTSPawn.

At least when I just tried it again (after hooking all arrays up) now it seems quick, you can mark the case solved but If it pops up again can I repoen it please and we make another question? or just keep on with this one as it is linked ?

Thanks .
Ben

Hi ,

I will mark this as answered for tracking purposes. You are welcome to re-open the question if the error occurs again. If you do, please let me know what steps I can take to reproduce it on my end.