Since 2016-12-15 Xamarin Build Times Increased - Stable/Beta Channels

I don’t think that would be related, the issue seems to be iOS related so far.

Hey Vik,

Yes Mobile Azure is on Xcode 8.2

But also for Android there is a serious delay because of the fact building from an empty system.
If you use Xamarin.Forms there is the following at a certain moment:

Downloading https://dl-ssl.google.com/android/repository/android_m2repository_r38.zip into /Users/vagrant/.local/share/Xamarin/zips

This is a pretty large file and depending on the internet speed this takes a long time. Furthermore, after this step, it starts unpacking.

Extracting /Users/vagrant/.local/share/Xamarin/zips/29EB87B0770A1740E6766163D3BFCB8B.zip to /Users/vagrant/.local/share/Xamarin/Xamarin.Android.Support.Compat/24.2.1/content
-> contains 6013 files

Extracting /Users/vagrant/.local/share/Xamarin/Xamarin.Android.Support.Compat/24.2.1/content/m2repository/com/android/support/support-compat/24.2.1/support-compat-24.2.1.aar to /Users/vagrant/.local/share/Xamarin/Xamarin.Android.Support.Compat/24.2.1/embedded
Extracted 1 of 14 files
Extracting /Users/vagrant/.local/share/Xamarin/zips/29EB87B0770A1740E6766163D3BFCB8B.zip to /Users/vagrant/.local/share/Xamarin/Xamarin.Android.Support.Core.UI/24.2.1/content
Extracted 601 of 6013 files
Extracting /Users/vagrant/.local/share/Xamarin/Xamarin.Android.Support.Core.UI/24.2.1/content/m2repository/com/android/support/support-core-ui/24.2.1/support-core-ui-24.2.1.aar to /Users/vagrant/.local/share/Xamarin/Xamarin.Android.Support.Core.UI/24.2.1/embedded
Extracted 1 of 10 files
Extracting /Users/vagrant/.local/share/Xamarin/zips/29EB87B0770A1740E6766163D3BFCB8B.zip to /Users/vagrant/.local/share/Xamarin/Xamarin.Android.Support.Core.Utils/24.2.1/content
Extracted 601 of 6013 files
Extracting /Users/vagrant/.local/share/Xamarin/Xamarin.Android.Support.Core.Utils/24.2.1/content/m2repository/com/android/support/support-core-utils/24.2.1/support-core-utils-24.2.1.aar to /Users/vagrant/.local/share/Xamarin/Xamarin.Android.Support.Core.Utils/24.2.1/embedded
Extracted 1 of 8 files
Extracting /Users/vagrant/.local/share/Xamarin/zips/29EB87B0770A1740E6766163D3BFCB8B.zip to /Users/vagrant/.local/share/Xamarin/Xamarin.Android.Support.Media.Compat/24.2.1/content
Extracted 601 of 6013 files
Extracting /Users/vagrant/.local/share/Xamarin/Xamarin.Android.Support.Media.Compat/24.2.1/content/m2repository/com/android/support/support-media-compat/24.2.1/support-media-compat-24.2.1.aar to /Users/vagrant/.local/share/Xamarin/Xamarin.Android.Support.Media.Compat/24.2.1/embedded
Extracted 1 of 19 files
Extracting /Users/vagrant/.local/share/Xamarin/zips/29EB87B0770A1740E6766163D3BFCB8B.zip to /Users/vagrant/.local/share/Xamarin/Xamarin.Android.Support.Fragment/24.2.1/content
Extracted 601 of 6013 files
Extracting /Users/vagrant/.local/share/Xamarin/Xamarin.Android.Support.Fragment/24.2.1/content/m2repository/com/android/support/support-fragment/24.2.1/support-fragment-24.2.1.aar to /Users/vagrant/.local/share/Xamarin/Xamarin.Android.Support.Fragment/24.2.1/embedded
Extracted 1 of 9 files
Extracting /Users/vagrant/.local/share/Xamarin/zips/29EB87B0770A1740E6766163D3BFCB8B.zip to /Users/vagrant/.local/share/Xamarin/Xamarin.Android.Support.v7.RecyclerView/24.2.1/content
Extracted 601 of 6013 files
Extracting /Users/vagrant/.local/share/Xamarin/Xamarin.Android.Support.v7.RecyclerView/24.2.1/content/m2repository/com/android/support/recyclerview-v7/24.2.1/recyclerview-v7-24.2.1.aar to /Users/vagrant/.local/share/Xamarin/Xamarin.Android.Support.v7.RecyclerView/24.2.1/embedded
Extracted 1 of 13 files
Extracting /Users/vagrant/.local/share/Xamarin/zips/29EB87B0770A1740E6766163D3BFCB8B.zip to /Users/vagrant/.local/share/Xamarin/Xamarin.Android.Support.Vector.Drawable/24.2.1/content
Extracted 601 of 6013 files
Extracting /Users/vagrant/.local/share/Xamarin/Xamarin.Android.Support.Vector.Drawable/24.2.1/content/m2repository/com/android/support/support-vector-drawable/24.2.1/support-vector-drawable-24.2.1.aar to /Users/vagrant/.local/share/Xamarin/Xamarin.Android.Support.Vector.Drawable/24.2.1/embedded
Extracted 1 of 7 files
Extracting /Users/vagrant/.local/share/Xamarin/zips/29EB87B0770A1740E6766163D3BFCB8B.zip to /Users/vagrant/.local/share/Xamarin/Xamarin.Android.Support.Animated.Vector.Drawable/24.2.1/content
Extracted 601 of 6013 files
Extracting /Users/vagrant/.local/share/Xamarin/Xamarin.Android.Support.Animated.Vector.Drawable/24.2.1/content/m2repository/com/android/support/animated-vector-drawable/24.2.1/animated-vector-drawable-24.2.1.aar to /Users/vagrant/.local/share/Xamarin/Xamarin.Android.Support.Animated.Vector.Drawable/24.2.1/embedded
Extracted 1 of 7 files
Extracting /Users/vagrant/.local/share/Xamarin/zips/29EB87B0770A1740E6766163D3BFCB8B.zip to /Users/vagrant/.local/share/Xamarin/Xamarin.Android.Support.v7.AppCompat/24.2.1/content
Extracted 601 of 6013 files
Extracting /Users/vagrant/.local/share/Xamarin/Xamarin.Android.Support.v7.AppCompat/24.2.1/content/m2repository/com/android/support/appcompat-v7/24.2.1/appcompat-v7-24.2.1.aar to /Users/vagrant/.local/share/Xamarin/Xamarin.Android.Support.v7.AppCompat/24.2.1/embedded
Extracted 57 of 573 files
Extracting /Users/vagrant/.local/share/Xamarin/zips/29EB87B0770A1740E6766163D3BFCB8B.zip to /Users/vagrant/.local/share/Xamarin/Xamarin.Android.Support.Design/24.2.1/content
Extracted 601 of 6013 files
Extracting /Users/vagrant/.local/share/Xamarin/Xamarin.Android.Support.Design/24.2.1/content/m2repository/com/android/support/design/24.2.1/design-24.2.1.aar to /Users/vagrant/.local/share/Xamarin/Xamarin.Android.Support.Design/24.2.1/embedded
Extracted 5 of 56 files
Extracting /Users/vagrant/.local/share/Xamarin/zips/29EB87B0770A1740E6766163D3BFCB8B.zip to /Users/vagrant/.local/share/Xamarin/Xamarin.Android.Support.v7.MediaRouter/24.2.1/content
Extracted 601 of 6013 files
Extracting /Users/vagrant/.local/share/Xamarin/Xamarin.Android.Support.v7.MediaRouter/24.2.1/content/m2repository/com/android/support/mediarouter-v7/24.2.1/mediarouter-v7-24.2.1.aar to /Users/vagrant/.local/share/Xamarin/Xamarin.Android.Support.v7.MediaRouter/24.2.1/embedded
Extracted 50 of 507 files
Extracting /Users/vagrant/.local/share/Xamarin/zips/29EB87B0770A1740E6766163D3BFCB8B.zip to /Users/vagrant/.local/share/Xamarin/Xamarin.Android.Support.v4/24.2.1/content
Extracted 601 of 6013 files
Extracting /Users/vagrant/.local/share/Xamarin/Xamarin.Android.Support.v4/24.2.1/content/m2repository/com/android/support/support-v4/24.2.1/support-v4-24.2.1.aar to /Users/vagrant/.local/share/Xamarin/Xamarin.Android.Support.v4/24.2.1/embedded
Extracted 1 of 7 files
Extracting /Users/vagrant/.local/share/Xamarin/zips/29EB87B0770A1740E6766163D3BFCB8B.zip to /Users/vagrant/.local/share/Xamarin/Xamarin.Android.Support.v7.CardView/24.2.1/content
Extracted 601 of 6013 files
Extracting /Users/vagrant/.local/share/Xamarin/Xamarin.Android.Support.v7.CardView/24.2.1/content/m2repository/com/android/support/cardview-v7/24.2.1/cardview-v7-24.2.1.aar to /Users/vagrant/.local/share/Xamarin/Xamarin.Android.Support.v7.CardView/24.2.1/embedded
Extracted 1 of 12 files

A lot of files extracted. And this proces takes around 4 to 5 minutes extra.

I tried to use the Cache, but if I specify /Users/vagrant/.local/share/Xamarin the cache is added as expected, but upon the next build you will see that only the first zip download is skipped by Xbuild and the extraction is still there. Of course this already cuts building time with at least some minutes but maybe you could find out where the files are going to and where xbuild tries to resolves the files.

running this against the current alpha stack redeuces the time further.
Xamarin just pushed a new RC in the beta channel, so when you update these vm’s in the weekend maybe there is some gain in build time!

In addition add /Users/vagrant/.local/share/Xamarin to the cach push step.
There seemed to be an issue with Xamarin that it did not correctly recognized the cached files. That is fixed in this alpha release (and in the meantime beta release). I brought my 10min build to 1m30s.

1 Like

The thing is that one of the purpose of a CI service is to do full clean builds, to prevent false negatives and false positives caused by previous builds’ results.

It’s of course possible and whether you want to do it depends on your project, but that’s why we have the #build-cache system of course :wink:

Btw @stefandevogelaere

Awesome! You might want to consider adding this as a #build-cache guide, you can mostly copy paste the template for a #how-to post from here How to cache CocoaPods dependencies I think :wink: It’d definitely help others / give them an idea about Xamarin related build caching.

Thanks for sharing your insights! :wink:

Wow!!!

You should definitely consider writing a #build-cache #how-to, or send us the details if you can so that we can write one, this is quite impressive!!

Definitely worth a try, it will be part of this weekend’s Xamarin Beta stack update of course :wink:

P.S.: just made the related stack updates changelog public: Weekly Virtual Machine / Stack updates - 2017.01.14

@aherrick can you please send us the logs from there, in email / onsite chat? We’d be interested to check it, maybe we can spot something, e.g. a mapping difference or similar.

1 Like

Thanks again, here too! :wink:

Hi

Any updates on this issue from your side?

My IOS builds are still taking 15mins to complete, no matter what I try.

Was is faster before the Xcode 8.2 upgrade? @GeradeDev

Yes, it was.

It took around 5-6mins to complete.

@GeradeDev can you give us access to the project, or to an example project where we could reproduce this issue?

How do we do that?

i already enabled the “Enable Bitrise Support user for this app?” on my bitrise app?

Should be enough - can you please ping us through the onsite chat / via email with the link to the app?

Done. Pinged through onsite chat.

1 Like

Thank you!

Hi Vik, just to chime in here again.

My Xamarin Forms iOS (8.2 Stable Channel) build is taking about 12-13 minutes consistently.

10.5 of those minutes is the Xamarin Archive step.