Slow gui scrolling performance with a large amount of GUIs

If you have a large amount (10k+) of Instances in a ScrollingFrame (and potentially a UIGridLayout), scrolling is pretty laggy. You could optimize this by not processing guis that are very far away from the users screen.

If you’re using a UILayout inside the ScrollingFrame, then we already do optimizations that help with this. I am currently working on a rewrite of the system responsible for sizing and positioning UI objects, and this new system is about twice as fast as the old one.

2 Likes

That’s good, but what I’m talking about is not the actual performance of the layout engine. That’s slow, yes, but the actual scrolling itself is slow.

Scrolling requires the layout of the UI to update.

Edit: You can see this yourself by looking at the microprofiler. UIGridLayout::applyMovement is the old system responding to the UI scrolling.

Oh, interesting. I never knew.

One thing you can do to resolve performance problems if you have a simple grid with thousands of items in it is to do a sort of “recycle” view where you only have a few elements at a time. I’ve made a quick example.

LazyGrid.rbxl (19.5 KB)

I am just wondering, why can’t this be a feature or something? This can help many devolopers like me. Ur LazyGrid is useful but the code is quite confusing to understand.

3 Likes