-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[Windows] UI Virtualization broken in Listviews #24343
Comments
Hi I'm an AI powered bot that finds similar issues based off the issue title. Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you! Open similar issues:
Closed similar issues:
|
Tested also without Hotreload and in Release. |
are you putting your listview inside a stack layout? somehow I recall reading somewhere that you shouldn't do that because it'd not contain the list controls and would force the listview to initialise everything, resulting in what you're complaining about. |
asked copilot:
|
@MitchBomcanhao |
yes, when taking snapshots I also see the number of objects increasing when using a grid. |
This issue has been verified using Visual Studio 17.12 Preview 1 (8.0.80 & 8.0.72). Can repro on windows platform with sample project. |
Description
I´m not an expert on this topic but from my experience in other xaml stacks this is looking fishy to me.
When using a ListView or Collectionview on Windows bound to a collection of 1000 items i observe the folowing.
When scrolling this itemscollections fast i end up with 3000+ instances of a contentview used in the Datatemplate.
In addition to 300+ instances of Microsoft.UI.Xaml.Controls.ListViewItem on the native side of things.
Beside the fact that the Cachelength of the ItemsStackpanel is 4 and my ViewportHeight is 500 and each Item has a Height of 100.
There should be round about 8 Instances of ListViewItem from my understanding and maybe also less instances of my Datatemplate on the Maui Side. Over 500 MB for an App only showing two Lists with an empty View just looks wrong to me.
Steps to Reproduce
Link to public reproduction project repository
https://github.com/Larhei/Maui-Issues/tree/main/ListVirtualisation
Version with bug
8.0.80 SR8
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Windows
Affected platform versions
windows10.0.19041
Did you find any workaround?
Nope
Relevant log output
The text was updated successfully, but these errors were encountered: