JRosanowski
JRosanowski

Reputation: 138

Extremely slow Xamarin.iOS builds

Our xamarin.iOS build is taking almost 5 minutes. Does anybody have any insight into why this is so bad? We have a number of native libraries that we're linking in. It wouldn't be so bad if we could do builds without cleaning but this Xamarin bug https://bugzilla.xamarin.com/show_bug.cgi?id=52165 means we can't do anything but clean builds. Thanks.

Tasks perfomance summary:
     0.165 ms  AssignCulture                                           1 calls
     4.000 ms  AssignProjectConfiguration                              4 calls
    16.440 ms  AssignTargetPath                                       18 calls
 24836.932 ms  Codesign                                                1 calls
  7561.935 ms  CodesignVerify                                          1 calls
    30.837 ms  CollectBundleResources                                  2 calls
     0.487 ms  CollectFrameworks                                       1 calls
    15.252 ms  CollectITunesArtwork                                    1 calls
    18.556 ms  CompileAppManifest                                      1 calls
    25.155 ms  CompileEntitlements                                     1 calls
    27.335 ms  CompileITunesMetadata                                   1 calls
    15.406 ms  ComputeBundleResourceOutputPaths                        1 calls
   737.619 ms  Copy                                                    8 calls
     0.689 ms  CreateAssetPackManifest                                 1 calls
     0.925 ms  CreateDebugConfiguration                                1 calls
    12.812 ms  CreateDebugSettings                                     1 calls
    87.254 ms  CreateItem                                            108 calls
     0.839 ms  CreatePkgInfo                                           1 calls
     0.193 ms  CreateProperty                                          1 calls
  2997.449 ms  Csc                                                     1 calls
     1.307 ms  Delete                                                  4 calls
     0.669 ms  DetectDebugNetworkConfiguration                         1 calls
     2.607 ms  DetectSdkLocations                                      1 calls
   138.342 ms  DetectSigningIdentity                                   1 calls
 24605.093 ms  DSymUtil                                                1 calls
    30.904 ms  EmbedMobileProvision                                    1 calls
     1.635 ms  FindAppConfigFile                                       1 calls
     1.453 ms  FindItemWithLogicalName                                 1 calls
     7.779 ms  FindUnderPath                                           1 calls
     1.678 ms  GetNativeExecutableName                                 1 calls
     0.589 ms  GetReferenceAssemblyPaths                               1 calls
     1.546 ms  MakeDir                                                 2 calls
     0.622 ms  Message                                                 2 calls
  1359.395 ms  MSBuild                                                 5 calls
272271.284 ms  MTouch                                                  1 calls
  3888.247 ms  OptimizeImage                                           1 calls
   157.087 ms  OptimizePropertyList                                    5 calls
     0.598 ms  ParseExtraMtouchArgs                                    1 calls
     0.319 ms  ReadLinesFromFile                                       1 calls
     0.989 ms  RemoveDir                                               3 calls
    46.349 ms  RemoveDuplicates                                        1 calls
    81.335 ms  ResolveAssemblyReference                                1 calls
   121.745 ms  SmartCopy                                               1 calls
  6812.551 ms  SpotlightIndexer                                        1 calls
     1.953 ms  Touch                                                   2 calls
   180.862 ms  UnpackLibraryResources                                  1 calls
     2.020 ms  ValidateAppBundleTask                                   1 calls
     1.478 ms  WriteItemsToFile                                        2 calls
     4.712 ms  WriteLinesToFile                                        2 calls

Build succeeded. 0 Warning(s) 0 Error(s)

Time Elapsed 00:05:46.1791850

Upvotes: 3

Views: 252

Answers (1)

Hichame Yessou
Hichame Yessou

Reputation: 2708

There are a couple of things that could be done to speed up your build.

Enable incremental builds & Enable device-specific builds

Those are under:

Properties -> iOS Build

And will build only the parts of your code that has been changed, while the device-specific build will build only the selected device.

Update your linker behaviour

When building for a device you can update the Linker Behaviour to Link all or to Don't link for the simulators. As for the incremental and device-specific builds you will find it under:

Properties -> iOS Build

Upvotes: 1

Related Questions