question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Slow builds on Mac M1

See original GitHub issue

Description

Here are build logs for iOS and Android on a newly installed M1 running Ventura, net7 and VS Mac public GA builds.

In general Android takes anywhere from 130s to 300+s to build cold. iOS is slightly better around 110s.

Archive.zip

Verified that CLI is also long.

dmo@Davids-MBP CarouselViewDemos % dotnet build -t:Run -f net7.0-android33.0
MSBuild version 17.4.0+18d5aef85 for .NET
  Determining projects to restore...
  All projects are up-to-date for restore.
/Users/dmo/work/maui-samples/6.0/UserInterface/Views/CarouselViewDemos/CarouselViewDemos/ViewModels/MonkeysViewModelWithDelay.cs(12,13): warning CS4014: Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call. [/Users/dmo/work/maui-samples/6.0/UserInterface/Views/CarouselViewDemos/CarouselViewDemos/CarouselViewDemos.csproj::TargetFramework=net7.0-android33.0]
  CarouselViewDemos -> /Users/dmo/work/maui-samples/6.0/UserInterface/Views/CarouselViewDemos/CarouselViewDemos/bin/Debug/net7.0-android33.0/CarouselViewDemos.dll

Build succeeded.

/Users/dmo/work/maui-samples/6.0/UserInterface/Views/CarouselViewDemos/CarouselViewDemos/ViewModels/MonkeysViewModelWithDelay.cs(12,13): warning CS4014: Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call. [/Users/dmo/work/maui-samples/6.0/UserInterface/Views/CarouselViewDemos/CarouselViewDemos/CarouselViewDemos.csproj::TargetFramework=net7.0-android33.0]
    1 Warning(s)
    0 Error(s)

Time Elapsed 00:01:54.56

When I installed clean I noticed that installing MAUI uses Rosetta. Wonder how much this impacts build perf.

Screenshot 2022-11-13 at 9 58 47 AM

Steps to Reproduce

I’m building the CarouselViewDemos project after updating the project to net7.

<TargetFrameworks>net7.0-ios16.0;net7.0-maccatalyst15.4;net7.0-android33.0</TargetFrameworks>

Link to public reproduction project repository

https://github.com/dotnet/maui-samples/blob/main/6.0/UserInterface/Views/CarouselViewDemos/

Version with bug

7.0 (current)

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android

Affected platform versions

API 33, iOS 16

Did you find any workaround?

nope

Relevant log output

No response

Issue Analytics

  • State:open
  • Created 10 months ago
  • Reactions:3
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
davidortinaucommented, Nov 17, 2022

CLI too, @jsuarezruiz . This isn’t a VS issue.

dotnet build -f net7.0-android33.0 -bl
...
Time Elapsed 00:10:47.92

msbuild.binlog.zip

0reactions
jonathanpepperscommented, Jul 14, 2023

@jinxinjuan so you are able to repro the ProcessAssemblies MSBuild task taking 7 minutes?

https://github.com/dotnet/maui/issues/11376#issuecomment-1318799259

This is an Android-only build step, but you mention iOS?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Xcode 14 slow on M1 mac book pro
Xcode 14.1 is building and running extremely slow on a brand new 16 inch MBP with 64gb ram. My old 2015 MBP is...
Read more >
M1 MacBook is very slow to build app, + runs out ...
M1 MacBook is very slow to build app, + runs out of memory often when archiving / building app. As title says. I'm...
Read more >
How to deal with slow Docker performance on M1/M2 Mac?
Hello folks,. This topic is about my experience with slow Docker performance on an M1 Macbook Air and my way to deal with...
Read more >
Slow performance on M1 Macbooks leads to supporting ...
While using buildx was enough to build and push both arm64 and amd64 images, compiling Kratix on an amd64 image on M1 Macs...
Read more >
M1 Max | Why is compiling slow? - YouTube
Code I wrote for this test: https://github.com/d3vtec/rosetta2- compile -test-kotlin Macbook Pros I currently own: 2021 M1 Max, 32 Core GPU, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found