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

The Map Control Lags During Scrolling When Android BottomSheet is Opened #14794

Open Alexgoon opened 1 year ago

Alexgoon commented 1 year ago

Description

.NET MAUI Map Control becomes sluggish when android BottomSheetDialog is opened (probably, the issue is not related to ButtomSheet).

We noticed that when BottomSheetDialog is closed, Map loads CPU at 10%. However when BottomSheetDialog is opened, CPU usage becomes even less: 3%. We are not sure what causes this performance issue..

Steps to Reproduce

  1. Add your Google API Key to the AndroidManifest.xml file

    <meta-data android:name="com.google.android.geo.API_KEY" android:value="YOUR_API_KEY" />
  2. Run the project

  3. Scroll/Pan the Map to make sure that it's scrolled smooth

  4. Tap one of the pin items

  5. Try to scroll the map - now it scrolls with freezes

Link to public reproduction project repository

https://github.com/Alexgoon/Map-BottomSheet-Performance-Issue-Project

Version with bug

7.0 (current)

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android 13

Did you find any workaround?

No

Relevant log output

No response

Video

https://user-images.githubusercontent.com/13753992/234814545-2cbb1c01-fd35-4e20-a6c6-cca65643d836.mp4

djkloster commented 10 months ago

Im running in the same Issue using Microsoft.Maui.Controls.Maps 8.0.3 and .NET8. Do you have any idea what could cause this or is there a known workaround ?

CeJay45 commented 10 months ago

I also encountered the same Issue using the same Microsoft.Maui.Controls.Maps 8.0.3 and .NET8. Did anyon find a workaround or solution yet?