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 issues with Mac Catalyst #78

Closed
akgulebubekir opened this issue Feb 9, 2023 · 4 comments
Closed

Performance issues with Mac Catalyst #78

akgulebubekir opened this issue Feb 9, 2023 · 4 comments

Comments

@akgulebubekir
Copy link
Owner

There is significant performance issue on Mac Catalys since commit 3d6dfc5. It also consumes more memory. Its probably same with other platforms. @symbiogenesis can you have a look at that?

@symbiogenesis
Copy link
Collaborator

symbiogenesis commented Feb 9, 2023

@symbiogenesis
Copy link
Collaborator

symbiogenesis commented Feb 9, 2023

The memory usage of the CollectionView has been very bad going back to Xamarin.Forms, and they never fully fixed it. There are other issues beyond that recent pull request.

There are multiple collection view projects and branches that try to improve things. Unfortunately, most such projects don't work on every MAUI platform.

See also:

Deploying a .NET 7.0 version to nuget may help a little, since only the .NET 6.0 version made it over.

I will do some more testing with the older nuget version to see if I notice any differences between the versions. But I will say that I had seen exactly those kind of issues with the old version.

Because there are enough changes to warrant a new release, I think we should do another release now, and we can keep researching this after.

@symbiogenesis
Copy link
Collaborator

symbiogenesis commented Feb 10, 2023

I found a way to reliably reproduce a case with bad performance.

My findings so far:

  • Reverting the ContentView wrapper: No visible improvement
  • Reverting to the DataTemplateSelector: No visible improvement
  • Reverting the WeakReference wiring for events: No visible improvement
  • Removing the LineBreakMode property: No visible improvement
  • Removing the IsVisible binding: No visible improvement

I also tried moving the _headerGrid inside of the HeaderTemplate of the CollectionView. This had no positive impact, but made the header no longer sticky at the top, and thus was worse.

My opinion is that MAUI has internal bugs, and that it potentially even worsened recently.

@symbiogenesis
Copy link
Collaborator

symbiogenesis commented Feb 10, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants