CollectionView slow/jittering scroll
See original GitHub issueDescription
When there is a complex layout Scroll does not work efficiently.
Steps to Reproduce
I have this layout, as you can see I have used the recommended bindings OneTime
and CompressedLayout.IsHeadless="True"
.
ItemSizingStrategy
has to be in mode: MeasureAllItems
. Each element can have a different height.
There are like 30-40 elements, the Scroll is unacceptable, both in debug/release mode. Thus, the application cannot be released to production.
I don’t know if I can improve my design, but i can’t get it. Any help is welcome.
Link to public reproduction project repository
https://github.com/angelru/CvSlowJittering
Version with bug
7.0 (current)
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 12
Did you find any workaround?
No response
Relevant log output
No response
Issue Analytics
- State:
- Created 9 months ago
- Reactions:11
- Comments:49 (24 by maintainers)
Top Results From Across the Web
Why my collectionview is slow when scrolling down or up? ...
The first step is to find out whether it is the Image s or your DataTemplate that is causing the slowdown. Test: Remove...
Read more >Improving CollectionView Scrolling
I found that two things were causing the UI to jitter when the user scrolls a CollectionView: Bindings; Garbage Collection. I was able...
Read more >The Collectionview Scroll Jank/Jitter thread!!!
Hi, I'd like to start a small discussion on this very issue which makes even web view frameworks (e.g. ionic, native script) eat...
Read more >Poor performance of CollectionView with SwipeView
The scrolling is not smooth only when the List has SwipeView inside, even with the simplest layout for SwipveView.Content. The scrolling is ...
Read more >CollectionView performance - Microsoft Q&A
Recreating controls while scrolling will lead to bad performance , I suggest you use a ScrollView to add all kinds of the subviews...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I believe we have enough changes to close this one, testing the above sample with my script here:
https://github.com/jonathanpeppers/maui-scrolling-performance
.NET 7:
.NET 8
net8.0
branch +main
on top:Scrolling feels a lot better. I tested these on a Pixel 5 (released in Oct 2020).
The list of performance changes, I think led to the improvement here:
The recent fixes for memory leaks, likely also helped.
We can always make this even better, but I think this is enough to close this one for now. Thanks!
What do I do if my app still scrolls slowly?
First, try it on the latest .NET 8 release and see if things have improved.
If not, file a new issue with a sample app, and we can profile the app and see what we find. You can also try the instructions at https://aka.ms/profile-maui to profile it yourself.
The memory leak here may have been fixed by: https://github.com/dotnet/maui/pull/13656
No idea about the performance of it, though.
Need to retest this issue, but I’ve been working on this all week instead: https://github.com/dotnet/maui/pull/13833