-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory leak when scrolling a CollectionView with IsGrouped=true #17698
Comments
We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process. |
@jonathanpeppers @samhouts |
Profiling on 8.0.100-rc.2 shows same result in GC Dump |
Looking at @tranb3r's two dumps, I came to a similar conclusion that a Let me investigate some more; thanks for filing this! |
My thoughts here, is the problem might be related to what I saw here: So, I tried something like this: main...jonathanpeppers:IsGroupedCollectionView But the test passes, and I also don't think it fixes the sample app above. I am going to be on vacation for a bit, so just writing this down for anyone else -- (or myself when I return 😄). |
Any progress? |
Also likely related to #18881 -- When I remove IsGrouped the scrolling is smooth with the GridItemsLayout & images. Anyone figure out why yet? |
@mjsb212 this one is specificly about CollectionView on Android. So if you are seeing an issue on another platform, file a new issue, thanks! I'm putting this on the list of "scrolling performance" issues we're ramping up to work on in the next few months. |
@tranb3r @jonathanpeppers -- Just to clarify: I am on Android and Release Build and after testing and profiling with dotnet trace & GC Dump, the issue I reported at #18881 seems to be related to this memory leak -- |
This is still happening with net 9. (maui 9.0.10 ; net-android 35.0.7) |
Description
On android with
net8-rc.1
, I'm comparing the memory usage of aCollectionView
with or withoutIsGrouped
.When scrolling a
CollectionView
withIsGrouped=true
, the memory usage increases infinitely.When scrolling a
CollectionView
withIsGrouped=false
, the memory usage is stable.Steps to Reproduce
Add
button, it will create aCollectionView
withIsGrouped=false
.CollectionView
up and down. Observe memory usage withdotnet-gcdump
. It is stable.Add
button, it will create aCollectionView
withIsGrouped=true
.CollectionView
up and down. Observe memory usage withdotnet-gcdump
. It is slowly increasing.gcdump
files I've captured when scrolling the second tab. Between the first (memory-12.gcdump
) and second (memory-19.gcdump
), thesize diff
is+144,688
for object typeList<Microsoft.Maui.Controls.Element>
.gcdump.zip
Link to public reproduction project repository
https://github.com/tranb3r/Issues/tree/main/MauiAppCollectionViewGroupingLeak
Version with bug
8.0.0-rc.1.9171
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 34
Did you find any workaround?
No workaround
Relevant log output
No response
The text was updated successfully, but these errors were encountered: