Widget Performance Issues
Hi there, I have noticed this bug in an earlier version of Unreal Engine 4 but I was making a chat system in Blueprint last night and basically it seems the more widgets you add into a scrollbox or any other kind of container the more the FPS of the game drops. I then because of this tried to implement a system which caps the number of children that the scrollbox could hold by deleting the oldest child once it reaches 250. The performance issue still however seems to occur and the FPS gradually decreases. To go about replicating this I would setup a scrollbox on a widget and put an event tick to add widgets into the scrollbox as children and then watch using the the "Stat FPS" command. Please fix this! I wanted to use this chat system in a game but if this bug continues I won't be able to. Thanks :)
asked May 02 '16 at 01:38 AM in Blueprint Scripting
Hey I think you're doing it wrong. You definitely should not be adding widgets on Event Tick. The reason is, it's an expensive operation, you're instantiating a visual object and adding it to the render tree, at 60 frame per second (more or less).
Widgets should be added once and then either recycled (look up object pooling) or simply created all at once at the start and then toggled on/off (Visibility: Collapsed / Visible)
answered May 02 '16 at 11:32 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here