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.03k stars 1.73k forks source link

Maui Build and render in emulator much slow #13750

Closed Vikas8881 closed 1 year ago

Vikas8881 commented 1 year ago

Description

Yesterday I start a new project in Maui. It takes time to launch in the emulator. 

then I see Hot Reload not working in the emulator. then I use debug. fine

but today it crossed limits just to view the app design I run the app and boom emulator is blank I wait and wait for its just a single page register page with 1 image, 3,4 label's and 1 button without any functionality.

I make a video for evidence because I see the Microsoft maui team not taking serious developers' comments. 

Visual Studio Microsoft Visual Studio Community 2022 (64-bit) - Current Version 17.5.1

here is the link below

https://drive.google.com/file/d/1bjNSCgtJifdsf6_yE5-qG-Q8N2w4sd5q/view?usp=share_link

Steps to Reproduce

  1. Create the App. Dotnet Maui
  2. Run the app in android Emulator with the default template.
  3. Create a simple registration Page using the default image of dotnet bot and some 2,3 labels and 1 button. because I am a beginner so I do have not much experience in xaml design and I try to check hows it looks. now after changing the default AppShell to Custom Page Register Page.
  4. Then Run the App it takes 10 minutes to launch. then I make some changes in xaml code for UI. I see hot reload does not work.
  5. Fine I restart the App. then I stop the application and resume the same project after few hours and it took 30 minutes to launch the app in the emulator I know the Microsoft team will not believe so I make a video on it showing the configuration of the system.

Link to public reproduction project repository

https://github.com/Vikas8881/RealEstateMaui

Version with bug

6.0.312

Last version that worked well

6.0.312

Affected platforms

Android

Affected platform versions

pixel 5 api 33

Did you find any workaround?

No response

Relevant log output

No response

jfversluis commented 1 year ago

I make a video for evidence because I see the Microsoft maui team not taking serious developers' comments.

I'm curious as to why you would say this. We take every report very serious.

Vikas8881 commented 1 year ago

i said because of many peoples want xaml desginer. because its very painfull for just view app desgin with hot reload and last time when i see you closed the ticket without any solution hot reload is a Nice feature yes it it but its cant take desginer place. according to me i am work in visual studio from the last 5 year's. But now more painfull for me what i show in video Build run and deploy and response 0 i can't see result emulator i try same thing in window machine there its work. and i use serious word because i want Microsoft team understand the our problem and give us solution or alternative. if its hurt you then sorry

mattleibow commented 1 year ago

The star of the emulator and build may be slow depending on your hardware and/or other running applications. However, if the deployment and running is the slow part, do you have Hyper-V or HAXM enabled?

Have a look at this doc and see if you are running in the fast path: https://learn.microsoft.com/en-us/dotnet/maui/android/emulator/troubleshooting?view=net-maui-7.0#performance-issues

ghost commented 1 year ago

Hi @Vikas8881. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

Vikas8881 commented 1 year ago

The star of the emulator and build may be slow depending on your hardware and/or other running applications. However, if the deployment and running is the slow part, do you have Hyper-V or HAXM enabled?

Have a look at this doc and see if you are running in the fast path: https://learn.microsoft.com/en-us/dotnet/maui/android/emulator/troubleshooting?view=net-maui-7.0#performance-issues

yes it's enabled

xtuzy commented 1 year ago
  1. i see your video, your emulator is slow to start. Do you try only start emulator and not build project? or use Windows subsystem for android
  2. wpf designer only show ui control of windows, Maui is for crossplatform and use control of platform, use hotreload is better. In my experience, Maui build windows app is faster than android and ios, so if you build app is slow when for android, you can try build it for windows.
Vikas8881 commented 1 year ago

I start the Emulator, Build the Project, Clear the auto generated File's rebuild etc i try all the thing's then i decide report here.

But yesterday i connect my Android Device using USB and it's work fine. maybe this issue with only virtual emulator. @xtuzy yes you are Right working on Windows Platform as expected. this issue happens with Android & IOS not Tested yet so i have no idea about IOS

ghost commented 1 year ago

Hi @Vikas8881. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version.

You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository.

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

Zhanglirong-Winnie commented 1 year ago

Verified this issue with Visual Studio Enterprise 17.7.0 Preview 2.0. Not repro on android platform with sample project. RealEstateMaui-master.zip 13750