Hi there fellow creators.
I’m having a problem where an UMG widget is making my FPS going from over a 100 to almost 40. That’s nonsense. I mean, the whole thing is made off of around 25 “Image” widgets with fairly complex materials attached to them but my framerate shouldn’t go down THAT much. After doing some analysis I found out this in the game thread using Unreal Frontend:
You could try opening up the console (~) in a running game and type stat slate and see what it says. You could also do, stat dumpave -num=100 -ms=0, which will dump the average of 100 frames worth of data without any of the stat slate rendering overhead.
Are you creating your game’s UI like 100 times? Those stats say you’re arranging 7311 child widgets. That’s a far cry from 20 image widgets. Are you also in the editor? Your numbers seem way off for a cooked standalone game.
And yes, I’m running this from the editor. Does running it from the editor affect performance THAT much?! I mean, when I do Remove from Parent the framerate goes back to like 100~110 FPS so it must be something with the UMG Widget.
EDIT: Also, I already have those 7000ish child widgets even when not spawning this particular widget. I get around 5000 even in new projects. I don’t think that is something that should be alarming.
Dunno why your frame rate is going down by that much why it’s active. You must be doing an awful lot of work inside the widget then.
Profiling in the editor isn’t an accurate method, the stats for slate include ALL slate, and since the editor is slate, you’re getting it too. The only accurate way is to build a stand alone game and gather your stats there.
The problem is the same, that Build Text thingy… and I don’t know why. I’m not doing anything with those text widgets.
Also, I packaged the game just to see if in the final build I would get the same performance issue and yes, I get around the same framerates as when playing in Standalone mode.
Ohhhhhhhhhhhhhhh, THAT was the problem! Thank you!
Man, this was harder to figure out than it should have been. Now my framerate has gone back to normal values.
This thread can be closed now. Thanks again!
Wow, thanks for this thread. I had the same issue on 4.7 and it turned out to be that I had left a font parameter null. The reason this is hard to find is that no error is thrown and the font still draws fine when setting default font to a bogus font or null.