Collectionview WinUI recycling item count calculation problem #20206
Labels
area-controls-collectionview
CollectionView, CarouselView, IndicatorView
platform/windows 🪟
s/triaged
Issue has been reviewed
s/verified
Verified / Reproducible Issue ready for Engineering Triage
t/bug
Something isn't working
t/perf
The issue affects performance (runtime speed, memory usage, startup time, etc.) (sub: perf)
Milestone
Description
Hi again,
For WinUI;
In .NET MAUI version 8.0.6 (last release), CollectionView was creating extremely high count of recycle items (creating 350 400 items for a 1000 set tough 15-20 was enough for its vertical size) It was continiously creating new recycle items while scrolling. So it was flickering and app was becoming unresponsive.
It is fixed here #20079
Now testing 8.0.7-preview.9929
CV works so much better now. But it still creates 5x more recycle items for rows. For below capture; CV needs 17 recycle items but it is creating 84 rows. When collectionview size is changed or recycle items vertical size is changed CV always creates 5x more than required recycle items. This makes whole app unresponsive for afew seconds. If a complex itemtemplate is defined that lasts longer.
It's not creating more recyle items while scrolling (just 1 or 2 sometimes), so scrolling performance is good comparing to 8.0.6
I tested CV for android, ios and maccatalyst. For those it creates just enough count of recycle items.
bandicam.2024-01-28.15-10-16-493.mp4
Steps to Reproduce
No response
Link to public reproduction project repository
https://github.com/enkaradag/collectionview_flicker_test2
Version with bug
Nightly / CI build (Please specify exact version)
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
Unknown/Other
Affected platforms
Windows
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: