dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
21.89k stars 1.69k forks source link

Navigating to a page with collectionview and carousel view is too slow, and the page transitions are not smooth. #23107

Open xyeie opened 1 month ago

xyeie commented 1 month ago

Description

I created a demo where clicking a button navigates to another page. However, the navigation process is sluggish, taking approximately 2-4 seconds in release mode and around 4-7 seconds in debug mode. Furthermore, after entering the page, swiping left or right to switch between pages is also unsmooth. While the performance is slightly better in release mode, it still falls short of the desired experience. I am unsure how to utilize dotnet trace as described in the guide at https://github.com/dotnet/maui/wiki/Profiling-.NET-MAUI-Apps. For someone without native Android development experience, there is a lack of detailed information, preventing me from proceeding with the instructions. This problem has been bothering me for a long time and I have been unable to solve it.

Steps to Reproduce

To download the demo project, compile and run it, that's all you need to do

Link to public reproduction project repository

https://github.com/xyeie/XinYeMobile

Version with bug

8.0.60 SR6

Is this a regression from previous behavior?

Not sure, did not test other versions

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

github-actions[bot] commented 1 month ago

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.

xyeie commented 1 month ago

https://github.com/dotnet/maui/assets/105901371/553e8b22-e2e7-4a58-a846-5852525d7cb7

xyeie commented 1 month ago

https://github.com/dotnet/maui/assets/105901371/85a9c6cd-22cc-4c55-9d5e-2a38509f6add

xyeie commented 1 month ago

This project is about to be used for production, but there are still many performance issues at the moment. From 2023 until now! please help me

xyeie commented 1 month ago

The above video effects are all in release mode on the Android platform

RoiChen001 commented 1 month ago

Can repro this issue at Android platform on the latest 17.11.0 Preview 2.0(8.0.60).

DominikErnst commented 1 month ago

I had a massive performance problem with a CollectionView inside a ScrollView. I deleted the ScrollView, now it is fast, but does not scroll horizontally anymore. MAUI is garbage.

davidortinau commented 1 month ago

On iOS (18 beta on a 15 Pro) the cold navigation I see the 2nd page in 1.5s, and on Android (Pixel 5) it's closer to 2s. While the page has a LOT going on, there should be some optimizations we can find. The warm navigation is instant.

Scrolling within the UI on both platforms was smooth and responsive for me.

On Android I saw slightly less improvement on the warm navigation.

I also tested with and without Shell and didn't note any significant difference related to the navigation performance.

jonmdev commented 1 week ago

On iOS (18 beta on a 15 Pro) the cold navigation I see the 2nd page in 1.5s, and on Android (Pixel 5) it's closer to 2s. While the page has a LOT going on, there should be some optimizations we can find. The warm navigation is instant.

Scrolling within the UI on both platforms was smooth and responsive for me.

On Android I saw slightly less improvement on the warm navigation.

I also tested with and without Shell and didn't note any significant difference related to the navigation performance.

Why are you testing Maui with the highest end iPhone costing $1000-1600 USD? Is this meant to be representative of the average global iOS user's experience?

"Scrolling within the UI on both platforms was smooth and responsive for me."

Would that not be expected in virtually every situation when you are using a brand new top of the line $1000-1600 USD device that virtually no one on earth (when you look at the global iOS population) can afford or utilize?

If you increase CPU/GPU high enough virtually every coding inefficiency becomes invisible. But unless someone is buying everyone on earth their own iPhone 15 Pro this is not a solution to any given potentially underlying problem.