I'm hoping there's some kind of planned performance improvement work on the gallery control, but posting this, in case there isn't.
At present, the gallery control is incredibly clunky/laggy when scrolling any faster than what I'd consider to be "unreasonablly slow". The behavior is
I will note:
I'm attaching a video of this behavior. While the lag you see might be "acceptable", it's not a great user experience on any platform. I understand that the gallery is probably working as designed for keeping resource utilization low on mobile devices, however, since this can be reproduce on mobile, too, I'm asking that Microsoft improve this.
Do you mean the whole gallery, or the controls within the gallery that are bound to the content/data? In my case, the gallery/parent is set to a dynamic height, but it's based off the heights of the app and a control that's vertically above the gallery. I tried setting my gallery to a fixed height, to test, and had no luck. My controls within that gallery are already a fixed height and the gallery's TemplateSize property is also fixed.
Our case was the whole gallery. It's height was being set dynamically based on size of its contents. We changed that to an explicit number of pixels and the lagging we were seeing while scrolling went away.
Sounds like perhaps a different issue than what you're facing.
Update on this, and likely to dash the hopes of many that are following it.
So the way Microsoft designed this component, it's actually re-rendering as part of the scrolling event, which appears to trigger after the scroll is done. So the content "isn't visible", until this happens. I don't see a way to work around this, as they clearly designed this for very slow scrolling, very few items, and/or very simplistic use cases. Anything with a lot of data, a lot of controls in the gallery template, or both, are pretty much out of luck without a redesign or overhaul of the gallery component by Microsoft. The only remotely close alternative for displaying data tabularly is DataTable, but the flexibility to customize the look and feel of that component is extremely limited.
Dang, that's crazy. The Gallery control, in my mind at least, is a critical workhorse control for most all app operations. I can't think of an app I have where a Gallery isn't used extensively. Every time you see cool customizations or screen layouts, a Gallery is typically utilized in there somewhere. That thing is lifeblood.
Bumping this. What is the deal with this? Like 30 records in a collection and and it's so poor when scrolling! It's not an excessively control heavy gallery either. Please sort this out MS 🙂
Hard to convince my users that this can compete with other platforms based on performance...
Hi.. couple things that help (but yes, performance is still poor, these things just make it worse)
Thank you Dave! I appreciate the help. Actually I have recently had some real success in making it perform better and feel more responsive. I will be sharing them on this thread as soon as I get time.
I’ve gotten the fluentui grid working in my test app. It’s amazing and performance is great. Obviously it’s just a grid but it supports so much in terms of drag to select. Multi select. Column resize and ordering etc. still has some things I’m trying to figure out but I got the basic grid working and multi select etc. I’m going to do a video and make the solution available once I finish learning and getting this done in the next few days.
Learn how to create your own user groups today!
Check out the new Power Platform Community Connections gallery!
Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.