x

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"

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 :)

Product Version: UE 4.11
Tags:
more ▼

asked May 02 '16 at 01:38 AM in Blueprint Scripting

avatar image

ElSnaps.
26 2 7 9

avatar image Nick Jackson May 02 '16 at 09:48 AM

Let me get this right. You're adding new widgets on tick and calling the associated performance hit as a "bug"? You might want to do a bit of reading first....

avatar image ElSnaps. May 12 '16 at 10:16 PM

No, I think I might have explained it badly. I used event tick to confirm that it was a bug, No matter how you add the widgets they still cause a lag. It was setup so that when you press enter it creates a message. No matter how these messages were created eventually they caused the client to permanently drop in FPS (Not just with event tick) But say all clients in the server typed out 1000 messages and used enter to send them this would add lag to the client even with a system automatically deleting the oldest message when there is over 250 widgets.

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

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)

more ▼

answered May 02 '16 at 11:32 AM

avatar image

keyle
1.8k 65 27 89

avatar image ElSnaps. May 12 '16 at 10:22 PM

As I explained to Nick Jackson, I didn't mean that this bug was specific to an event tick. It's physically when any widget is added to a container using any method it causes lag on the clients. However, I thought since I had a system to delete them this would cause the lag to not get any worse once the max amount of widgets using the system I set up (250) had been reached but after more thought I think that it might not be a bug of sorts but I think that the widgets might be getting stored in ram so when you add them even if you delete them they still contribute to the lag because they aren't being removed from ram (Hence the continuous FPS drop), Although i'm sure i'm likely wrong about that. But thank you for that info on object pooling.

(comments are locked)
10|2000 characters needed characters left
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