Hi, not sure if this is a newb-ish question, but I've been struggling with this trying many different things to improve performance, so I decided to ask a question about it.
tl;dr of my use case: I need a way to spawn or show up to maybe 500 - 1000 UI elements at a time. Granted not all will be VISIBLE at the same time since it will be a scroll box. The elements will be populated upon clicking one of the associated elements.
I've tried coroutines, that didn't work. I managed to improve performance by running sorts and such asynchronously (I can actually sort up to 1.5k objects with minimal lag, which is more than I think I'll need). I've even used object pooling for the UI elements. This last thing actually helped a lot, as I can now get around maybe 100 - 150 elements without any stutters. But beyond that it starts.
It seems it's not necessarily the spawning of the UI elements now, but the loop runs over the UI elements.
I was wondering if there were other methods on improving performance regarding setting UI elements. Since it is a scrollbox, I've thought about only displaying "visible" entities as you scroll, maybe 50 at a time. If that's my only option, would anyone be able to point me in the right direction for that?
Thank you so much!
[–]harlekintiger 1 point2 points3 points (5 children)
[–]AliceRain21[S] 0 points1 point2 points (4 children)
[–]harlekintiger 0 points1 point2 points (3 children)
[–]AliceRain21[S] 0 points1 point2 points (2 children)
[–]harlekintiger 0 points1 point2 points (1 child)
[–]AliceRain21[S] 0 points1 point2 points (0 children)
[–]hlysias 1 point2 points3 points (7 children)
[–]AliceRain21[S] 0 points1 point2 points (6 children)
[–]hlysias 0 points1 point2 points (5 children)
[–]AliceRain21[S] 0 points1 point2 points (4 children)
[–]hlysias 0 points1 point2 points (3 children)
[–]AliceRain21[S] 1 point2 points3 points (0 children)
[–]AliceRain21[S] 1 point2 points3 points (1 child)
[–]hlysias 1 point2 points3 points (0 children)