brminnick / ImproveXamarinBuildTimes

Tips and tricks on how to speed up the time it takes to compile a Xamarin app
MIT License
172 stars 17 forks source link

Recommend "Don't Link" for Android debug builds. #8

Open jgold6 opened 5 years ago

jgold6 commented 5 years ago

Linking adds a fair amount of time to Android builds. IN one recent support case I handled, disabling the linker was they key to improving the incremental build time after a small code change.

So in the Android Linker section you say:

Linker Behavior: Link SDK assemblies only

  • The Linker will reduce the amount of managed code which means less native code to compile
  • Because Android uses emulators which behave similarly to Android devices, there isn't a recommended difference between Emulator & Device builds for the Linker settings like there is for iOS

So though there may not be a recommendation for simulator/ device builds, there is a recommendation for incremental versus full builds, as noted in this blog post: https://devblogs.microsoft.com/xamarin/optimize-xamarin-android-builds/

Using AOT, Linking, or a Code Shrinker for Debug configurations is not that helpful. They will slow down your Debug builds with no real benefit.

brminnick commented 5 years ago

Thank you sir!

I’ll make sure to roll in these updates 👍