Skip to content
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

CollectionView rendering hangs the apps #23992

Closed
chabiss opened this issue Aug 3, 2024 · 5 comments · Fixed by #24125
Closed

CollectionView rendering hangs the apps #23992

chabiss opened this issue Aug 3, 2024 · 5 comments · Fixed by #24125
Assignees
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView fixed-in-8.0.90 fixed-in-9.0.0-rc.1.24453.9 platform/windows 🪟 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@chabiss
Copy link
Contributor

chabiss commented Aug 3, 2024

Description

Not sure what I'm doing wrong, but the layout of the collectionview, which contains only 119 elements, tank the performance of the Collection View.

Collection.View.Renderingmp4.mp4

Steps to Reproduce

  1. Clone https://github.com/chabiss/periodictable
  2. Build the solution
  3. Make sure the PeriodictableMaui project is the startup project
  4. Launch the app on Windows
  5. Click the button "List All Elements"

Link to public reproduction project repository

https://github.com/chabiss/periodictable

Version with bug

8.0.71 SR7.1

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

No response

Did you find any workaround?

No

Relevant log output

No response

@chabiss chabiss added the t/bug Something isn't working label Aug 3, 2024
Copy link
Contributor

github-actions bot commented Aug 3, 2024

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:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@ninachen03 ninachen03 added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Aug 6, 2024
@ninachen03
Copy link

I can repro this issue at Windows platform on the latest 17.11.0 Preview 6.0(8.0.61 & 8.0.71)

@chabiss
Copy link
Contributor Author

chabiss commented Aug 6, 2024

Switching to Release Build didn't improve the performance.

@chabiss
Copy link
Contributor Author

chabiss commented Aug 8, 2024

Remove the wrapping VerticalStackLayout wrapping the CollectionView. This improved the performance, but the initial load is still very slow

@Foda Foda self-assigned this Aug 9, 2024
@Foda
Copy link
Member

Foda commented Aug 9, 2024

Hello! This appears to be caused by a combo of how your ViewModels are being used and a bigger issue with the Border control (#24123).

While we work on a fix, one minor work-around would be to have different ViewModels for the AllElements page, and MainPage. Both ViewModels could then just reference one PeriodicTableDataEngine.

The issue is partially caused by both pages being bound to the same list of elements on the same instance of a ViewModel. This causes both pages to always remain in-memory (it leaks) and the elements also remain in the visual tree. When the element list is refreshed the Grid on the MainPage also updates even though it's not visible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView fixed-in-8.0.90 fixed-in-9.0.0-rc.1.24453.9 platform/windows 🪟 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants