Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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

Product Version: UE 4.12
more ▼

asked Jul 18 '16 at 07:06 PM in Using UE4

avatar image

189 22 23 34

avatar image Adam Davis STAFF Jul 18 '16 at 08:27 PM

Hi bennetherwood,

  • 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?

avatar image bennetherwood Jul 19 '16 at 01:08 PM

Hi Adam, 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]: /storage/temp/99089-dxdiag.txt

Thank your for your time Ben

dxdiag.txt (45.7 kB)
avatar image Adam Davis STAFF Jul 19 '16 at 01:19 PM

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?

avatar image bennetherwood Jul 19 '16 at 01:49 PM

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 ?

avatar image Adam Davis STAFF Jul 19 '16 at 02:10 PM

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.

avatar image bennetherwood Jul 19 '16 at 02:17 PM

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

avatar image Adam Davis STAFF Jul 19 '16 at 03:41 PM

Hi bennetherwood,

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.

avatar image bennetherwood Jul 19 '16 at 08:41 PM

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 ?

avatar image Adam Davis STAFF Jul 20 '16 at 02:37 PM

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.

avatar image bennetherwood Jul 22 '16 at 07:19 PM

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?

avatar image Adam Davis STAFF Jul 25 '16 at 02:30 PM

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

avatar image bennetherwood Jul 26 '16 at 02:38 PM

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

avatar image Adam Davis STAFF Jul 26 '16 at 04:56 PM

Hi bennetherwood,

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?

avatar image bennetherwood Jul 26 '16 at 07:37 PM

Hi Adam, 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 Adam. Ben

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hi bennetherwood,

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.

more ▼

answered Jul 27 '16 at 03:48 PM

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question