Big blueprints become very slow until restart

I have 1 blueprint in particular, you guessed it, the player character which has quite a few nodes, many many functions and tons of variables. I’ve already tried to optimize it as much as I possibly can using function libraries, as many local variables as possible. I cleaned up event graph, compiled everything in reusable functions. But still the blueprint has quite a lot of stuff. Now, whenever I first launch my project and the first 15 -30 mins working inside the character blueprint goes quite well and fast, but after that it suddenly starts to become extremely slow and unresponsive. Simple commenting sometimes takes up to a minute to complete. Working like this is very hard and annoying, especially when you are trying to fix a bug. A solution is restarting the editor every 15 minutes, but this is quite annoying as well, as I always have to wait 5 full minutes until the project is restarted.

I’m guessing the editor is keeping track of the adjustments you do inside a blueprint so that you can undo stuff, which is probably why things start to go slow after a while. So my question is, is this the reason or is there some other reason? And if yes, how can I manually clear the undo history or limit the amount of actions so I can keep working at full speed?

Hey there :slight_smile:

  1. make sure you don’t have too many function tabs open while working on your character BP, sometimes they take up your memory space and it ends up slowing your computer down (right-click “close all other tabs”)
  2. make sure your content browser is not displaying miniature thumbnails (just put them on column mode)
  3. as you mentionned, check out editor preferences to see if there’s a setting with “undo” you can modify to see if it changes your performances
  4. split your character into smaller units (I have a blueprint class with over 150 functions and no problems at all) - tell me what logic your character is handling and I’ll tell you how you can do that

Quote me if you respond :slight_smile:

Thanks, closing other tabs seems to help a little bit. But it still gets very slow after a while though, to the point where compiling takes several minutes. I don’t have 150 functions in my blueprint yet, around 31 so far. I do have quite a few variables. About 40 I think, can’t see any count anywhere. Other than that my even graph does have many nodes. But most of them are already function nodes. There are still regular nods here and there, but most can’t be placed in functions such as “load asset”, replication functions and some other stuff.

The logic my character is handling is mostly action related, such as walking, running, swimming, jumping, fighting, dying, getting hit, some special modes like aim mode, camera modes and also item equiping (well the visual part of it, inventory is managed in the controller)

WixZ, I feel you on this matter. I have similar issues with my main character BP as well. It doesn’t get to the point of taking a whole minute to comment something, but it really starts bogging down and I have to restart the whole editor. I have no problem with simple BPs, but my main character BP has thousands of nodes and it feels like I get a good 15 minutes or so before it begins to snail crawl.

Open your task manager, then go to performance. Also open up the resource monitor and get the disk tab open(sort it by total B/sec). If you’re on Windows 10, within the task manager, you can just double click on one of the names and it will collapse the TM into a small little window. With both the task manager(small window) and resource monitor(minimized), watch your ram and hard drive usage. You could be capping out on physical ram and it might be trying to write to your page file instead. Obviously, hard drive speed has a minuscule amount of speed compared to ram. You’ll know if you see your hard drive usage shoot up to ~100% usage for any length of time, tab over into the resource monitor and check out what’s using your hard drive. If you see anything writing to the page file or if you see anything about compression, then you’ve definitely ran into a ram issue.

Another thing to do is go into the editor preferences>search for “Show Frame Rate and Memory” and enable it. It will show in the top right near search for help text field area.

I’m pretty sure it has to be some kind of undo caching issue. I don’t think they use a scratch space file on the hard drive, similar to what programs like Zbrush or Photoshop use, so it ends up ram bloating the hell out of the editor. It seems like it snapshots every single node, per “undo step,” rather than only tracking the ones that have been modified.

Thanks for the advice and yes that’s my thought exactly. I wonder if there is like some kind of console command / key you can use to clear the undo cache, similar like restarting the editor, without actually restarting it. I don’t mind losing all my undo steps every now and then, but I do mind restarting the editor which takes forever sometimes.

Also, I have 16 gb of physical memory and my main hard drive is a 500 gb SSD. I’ll check task manager and see what’s up but honestly I have never experienced any performance issues with other programs. I use zbrush, photoshop, 3dsmax and audacity all the time. Heck, most of the time I have them all running at the same time without any issues. However, when I have Unreal running i make sure most or all of these programs are closed in the background, but even then I still get the blueprint slowdowns. Other than the slow blueprints Unreal editor runs like butter though. No problems what so ever. Except for those big blueprints.