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

Slow Collectionview Rendering performance in Maui compared to Xamarin #24224

Open
brentpbc opened this issue Aug 13, 2024 · 7 comments
Open

Slow Collectionview Rendering performance in Maui compared to Xamarin #24224

brentpbc opened this issue Aug 13, 2024 · 7 comments
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert platform/android 🤖 platform/iOS 🍎 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

Comments

@brentpbc
Copy link

Description

I am currently migrating our existing LOB app that is on the iOS app store from Xamarin Forms to .Net Maui and I am noticing performance issues in the Maui version compared to the Xamarin version. This is most noticeable when testing on older slower devices such as the 2018 6gen iPad we have access to which is a good representation of the devices our customers would be using.

I have created an example repo https://github.com/brentpbc/maui-xam-testing.git that contains a Xamarin solution and a Maui solution, both have essentially the same code. In the test app there is a "CollectionView2 Page" button, in the Maui version after tapping the button there is a delay navigating to the "CollectionView2 Page" which is not present in the Xamarin version and then once the page is displayed the scroll stutters and doesn't match the performance of the Xamarin version. Both versions were built in Release mode when comparing. See below screen recordings for a comparison.

Xamarin solution: https://github.com/brentpbc/maui-xam-testing/tree/main/CollectionViewTesting1/CollectionViewTestAppXam
Maui solution: https://github.com/brentpbc/maui-xam-testing/tree/main/CollectionViewTesting1/CollectionViewTestAppMAUI

MAUI ios Simulator iPad 6Gen Speedscope File: https://github.com/brentpbc/maui-xam-testing/blob/main/CollectionViewTesting1/Speedscope/iPad_6gen_sim_CollectionViewTestAppMAUI.speedscope.json

Xamarin Screen Recording:
https://github.com/brentpbc/maui-xam-testing/raw/main/CollectionViewTesting1/ScreenRecordings/iPad_6gen_device_Xamarin.mp4

iPad_7_Xamarin.mp4

Maui Screen Recording:
https://github.com/brentpbc/maui-xam-testing/raw/main/CollectionViewTesting1/ScreenRecordings/iPad_6gen_device_Maui.mp4

iPad_7_Maui.mp4

Steps to Reproduce

  1. Clone repo
  2. Build Xamarin Version https://github.com/brentpbc/maui-xam-testing/tree/main/CollectionViewTesting1/CollectionViewTestAppXam in release
  3. Build Maui Version https://github.com/brentpbc/maui-xam-testing/tree/main/CollectionViewTesting1/CollectionViewTestAppMAUI in release
  4. Open the Xamarin app and tap "CollectionView 2 Page" button and scroll list
  5. Open the Maui app and tap "CollectionView 2 Page" button and scroll list and compare time to load page + scrolling performance to xamarin.

Link to public reproduction project repository

https://github.com/brentpbc/maui-xam-testing.git

Version with bug

8.0.80 SR8

Is this a regression from previous behavior?

Yes, this used to work in Xamarin.Forms

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android

Affected platform versions

No response

Did you find any workaround?

No

Relevant log output

No response

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

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.

@Zhanglirong-Winnie Zhanglirong-Winnie added platform/android 🤖 platform/iOS 🍎 s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert labels Aug 14, 2024
@Zhanglirong-Winnie
Copy link

This issue has been verified using Visual Studio 17.11.0 Preview 7.0 (8.0.80 & 8.0.40 & 8.0.3 & 7.0.101). Can repro on iOS and Android platforms.

@PureWeen PureWeen added the t/perf The issue affects performance (runtime speed, memory usage, startup time, etc.) (sub: perf) label Aug 16, 2024
@PureWeen PureWeen added this to the Backlog milestone Aug 16, 2024
@samhouts samhouts added the area-controls-collectionview CollectionView, CarouselView, IndicatorView label Aug 28, 2024
@brentpbc
Copy link
Author

Any updates on this?

@SethupathyD
Copy link

Hi .NET MAUI team,

we are also encountering the same issue on android platform. Could you please provide an update on the status of this issue and an estimated timeline for a fix?

Thank you for the support.

Regards,,
Sethupathy D.

@jonmdev
Copy link

jonmdev commented Sep 30, 2024

For cross referencing I believe I have found one of the causes (if not the main cause) of the poor performance in scrolling/translation in iOS Maui. Every time you change the translation of any objects in iOS, Maui is causing the whole hierarchy to re-arrange itself and re-measure itself in iOS. This is not happening in Android/Windows.

I have shared my bug report here which demonstrates the issue: #24996

@IliyanPopov
Copy link

Important observation:
I’ve noticed similar lagging performance in the app I’m working on when built with Xcode 15.4.
However, after updating the build pipeline to use Xcode 16.0, performance has improved significantly. While it’s still not on par with the Xamarin.Forms version, it seems like it might do the job.

@brentpbc
Copy link
Author

brentpbc commented Jan 8, 2025

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 migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert platform/android 🤖 platform/iOS 🍎 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)
Projects
None yet
Development

No branches or pull requests

7 participants