Hello,
I noticed that UCanvasPanel::AddChildToCanvas is super slow.
I takes around 3-4 seconds to add ~30 widgets in a for loop.
Should i be using another mechanism to automatically populate a canvas panel at runtime ?
It gives me two problems:
- i repopulate the canvas by clicking buttons, so it’s not responsive at all
- when clients connect to the server, it seems that the UI is entirely rebuild, so Initialize(), preconstruct() and construct() are called at each client connection and i get a few seconds freeze when a client comes in.
I tried to put the populating for loop in a separate thread (FRunnable) but it doesn’t solve the problem.
I also tried to use timers. It’s ok when i call one AddChildToCanvas every .1 s, but given that i can have a lot of widgets (> 100), it takes forever to populate the canvas and leads to other problems.
Is there a fast way to populate a CanvasPanel at runtime ?
Thanks
Cedric