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
22.21k stars 1.75k forks source link

MAUI Canvas Drawing Slow on Android not iOS #25628

Open tpitman opened 6 days ago

tpitman commented 6 days ago

Description

I am using Steema TeeChart nuget for MAUI.

I have several charts in several different apps. These apps were Xamarin Forms apps and have been ported to MAUI. They all performed fine in Xamarin Forms.

The perform fine when run on iOS, but are very slow on Android.

I reached out to Steema about this and they have been working on it for a month.

This is the last response I received from them:

I've rechecked all, also tried to draw a Vertical line on canvas instead of making use of the cursor tool, but the problem comes directly from the internalDraw and from MAUI canvas drawing, it's very slow and for the moment I can't find a way to improve it.

If you do a search for MAUI drawing on Android you will see that they have a problem with speed but don't say a solution for the moment. 

As you noted this problem does not happen on iOS.

I did a search as he suggested, but didn't really find anything definitive.

Is there some kind of known issue with the Canvas drawing on MAUI that I can suggest a fix to Steema?

Steps to Reproduce

  1. Create a chart using Steema TeeChart for MAUI
  2. Runs fine on iOS
  3. Very slow on Android

Link to public reproduction project repository

No response

Version with bug

8.0.82 SR8.2

Is this a regression from previous behavior?

Yes, this used to work in Xamarin.Forms

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android 11 and up

Did you find any workaround?

I have not and am stuck. I need to release my updated Android for API violation and can't. My app will be removed from the app store tomorrow.

I was ready to release the updated MAUI app for the API violation a month ago. I am stuck because of waiting on the vendor, but they say it is a MAUI issue.

Relevant log output

No response

jsuarezruiz commented 6 days ago

Could attach a small sample where reproduce the problem?

tpitman commented 6 days ago

I cannot create such a project because this is happening inside the Steema TeeChart component and I have no idea exactly what they are doing that causes this issue. The developer there seems to think it is a generally known issue with MAUI and Canvas drawing on Android. I was hoping you guys would have heard of this issue and could provide me some guidance.

I am going to give the link to this issue to the Steema developer in the hopes he will join in the conversation, but I can't rely on that.

tpitman commented 2 days ago

The Steema developer has not replied about joining this conversation. Can anyone on the dotnet maui team confirm that there has been an issue with slow canvas drawing on Android that might be related and a work around or solution that I can pass along to the Steema developer?

My app is now at risk to be removed from the android app store awaiting this fix.