Skip to content

[Android] In debug the app is way way slower than in xf #20739

@roubachof

Description

@roubachof

Description

I am currently doing the maui migration of an app running on a big but slow device for an important client.
We have a big app running on a android device with tons of views.
On XF it was slow, on MAUI it seems faster, but only when all the views are constructed, during the constructions of the views (meaning when the UI thread is loaded) it takes forever.

I am experiencing a very slow debugging experience in MAUI. In XF it wasn't great but with MAUI it's about 5x times slower.

The device is an old arm 32bits, a armeabi-v7a with 4 cores:

model name      : ARMv7 Processor rev 10 (v7l)
BogoMIPS        : 7.54
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpd32
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x2
CPU part        : 0xc09
CPU revision    : 10

Here is the comparison of android studio cpu profiling for the same view:

This is the XF version:

image

This is the maui version:

image

We can see that maui is 8x times slower.

On XF we can see the dispatchMessage is short and some work is done each time.

On MAUI the dispatchMessage last forever and seem to be doing nearly nothing..

Is it something weird or maybe the way the looper and handlers are used in MAUI changed a lot compared to XF?

Steps to Reproduce

No response

Link to public reproduction project repository

No response

Version with bug

8.0.7 SR2

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

No response

Did you find any workaround?

I am developping in RELEASE mode :)

Relevant log output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-toolingXAML & C# Hot Reload, XAML Editor, Live Visual Tree, Live Preview, Debuggingi/great-reporterThis issue is opened by an author who is known to open high-quality issuesmigration-compatibilityXamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convertperf/debugperf/generalThe issue affects performance (runtime speed, memory usage, startup time, etc.) (sub: perf)platform/androids/needs-attentionIssue has more information and needs another lookt/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions