I have a very simple test app which has a camera control, takes a photo and uploads it as base64 to a varchar field in SQL. The table also has a Date, Name and File Name column which are patched with the image data. The app works as expected until I try and view the gallery or sort it by Date, Name or File Name. The gallery template displays the Image, Date, Name and File Name. The gallery takes about 20 seconds to load the data and when I click the sort button, it takes about 15 seconds each time to do the sort. I only have 4 records in my table!
My gallery items property is
Sort(ImageList,Date,If(SortAscending,Ascending,Descending))
and my sort button OnSelect property is
UpdateContext({SortAscending: !SortAscending})
I have had a look at this article but don't see anything that might help me:
Considerations for optimized performance in Power Apps
Should I be saving my loaded gallery items to a collection?
When using Excel or SharePoint as a data source, with a lot more records, a sort takes less than a second.
UPDATE: I did find this article which seems a bit more relevant. I will try this method and report the results:
Performance considerations with PowerApps