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

[Performance] CollectionView slow first render #24994

Open
OvrBtn opened this issue Sep 29, 2024 · 4 comments
Open

[Performance] CollectionView slow first render #24994

OvrBtn opened this issue Sep 29, 2024 · 4 comments
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView platform/android 🤖 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.)

Comments

@OvrBtn
Copy link

OvrBtn commented Sep 29, 2024

Description

Context

This is a dupe of #15204 I'm creating this issue to throw in here anything I find/record while testing to avoid making a bunch of messy comments in original issue.

All the videos were recorded on physical android device (Samsung Galaxy A50) in release configuration.
All dotnet-traces were recorded using android emulator in release configuration.

This issue was also present in .net 7, I haven't tested version before.

Using a fork last synced on 24.09.24 - issue is still present.

Issue showcase

Using linked repro

Screen_Recording_20240929-220529.mp4

Simplified situation with CollectionView having just 1 element, demo running in Maui.Controls.Sample.Sandbox

Here I've copied to MAUI's codebase XAML and code from linked repro - SimpleCollectionView1Page and it's ViewModel and Model to be exact.

Screen_Recording_20240929-221548.mp4

Even with single element in CollectionView navigation is still slow.

Here is a recorded dotnet-trace:
maui-app_20240929_201458-SimpleCV-WithCV.speedscope.json

Similar situation like above but the CollectionView is removed and only what was in the DataTemplate is left as content of the page

Screen_Recording_20240929-222021.mp4

As you can see navigation is faster.
I made this recording to show that probably the CollectionView is at fault. Maybe by comparing dotnet-trace someone will catch something?

Recorded dotnet-trace:
maui-app_20240929_090419-SimpleCV-WithoutCV.speedscope.json

Steps to Reproduce

Videos should show everything, if something is not clear please let me know.

Link to public reproduction project repository

https://github.com/OvrBtn/MAUIPerf

Version with bug

Unknown/Other

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

No response

Did you find any workaround?

No response

Relevant log output

No response

@OvrBtn OvrBtn added the t/bug Something isn't working label Sep 29, 2024
Copy link

We've found some similar issues:

If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.

Note: You can give me feedback by 👍 or 👎 this comment.

@OvrBtn
Copy link
Author

OvrBtn commented Sep 29, 2024

@jonathanpeppers sorry for ping but in the original issue you asked for .speedscope so maybe you will find this useful.

@OvrBtn
Copy link
Author

OvrBtn commented Sep 29, 2024

I guess the most eye catching difference is the measurement
Example with CollectionView:
image
Example without CollectionView:
image

Exactly the same stuff to draw on screen and yet huge difference.

@jfversluis jfversluis added area-controls-collectionview CollectionView, CarouselView, IndicatorView t/perf The issue affects performance (runtime speed, memory usage, startup time, etc.) labels Sep 30, 2024
@Zhanglirong-Winnie Zhanglirong-Winnie added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Oct 16, 2024
@Zhanglirong-Winnie
Copy link

This issue has been verified using Visual Studio 17.12.0 Preview 3(8.0.92& 8.0.90). Can repro this issue on android platform.

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 platform/android 🤖 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.)
Projects
None yet
Development

No branches or pull requests

4 participants