xamarin / AndroidSupportComponents

Xamarin bindings for Android Support libraries - For AndroidX see https://github.com/xamarin/AndroidX
MIT License
146 stars 56 forks source link

Android compilation time increase since upgrade to v24 #32

Closed thomasvdb closed 7 years ago

thomasvdb commented 7 years ago

Xamarin.Android Version (eg: 6.0):

Xamarin.Android version 7.0

Operating System & Version (eg: Mac OSX 10.11):

Max OSX 10.11.6

Support Libraries Version (eg: 23.3.0):

24.2.1

Describe your Issue:

Since the upgrade to v24 (from v23), the Android compilation time has increased a lot!

Very small part of the diagnostics build output (support packages v24 and Android target framework 7.0):

Target perfomance summary:
     2.491 ms  _AddCorlibReference                                     1 calls
     0.936 ms  _AddDebugStaticResources                                1 calls
     4.082 ms  _AddLibraryProjectsEmbeddedResourceToProject            1 calls
     0.337 ms  _AddMultiDexDependencyJars                              1 calls
     8.415 ms  _AddStaticResources                                     1 calls
   493.536 ms  _AdjustJavacVersionArguments                            1 calls
175672.993 ms  _BuildAdditionalResourcesCache                          1 calls
   192.357 ms  _BuildLibraryImportsCache                               1 calls
   281.155 ms  _BuildSdkCache                                          1 calls
     2.881 ms  _CalculateAdditionalResourceCacheDirectories            1 calls
     1.292 ms  _CheckDuplicateJavaLibraries                            1 calls
     0.069 ms  _CheckForContent                                        1 calls
     0.094 ms  _CheckForDeletedResourceFile                            1 calls
     0.183 ms  _CheckForInvalidConfigurationAndPlatform                1 calls
     0.459 ms  _CheckInstantRunCondition                               1 calls
     0.835 ms  _CheckProjectItems                                      1 calls
     0.069 ms  _CheckTargetFramework                                   1 calls
   622.210 ms  _CheckTargetFrameworks                                  1 calls
   517.327 ms  _CollectAdditionalResourceFiles                         1 calls
    11.265 ms  _CollectConfigFiles                                     1 calls
    19.990 ms  _CollectMdbFiles                                        1 calls
    17.692 ms  _CollectMonoAndroidOutputs                              1 calls
    14.038 ms  _CollectPdbFiles                                        1 calls
     1.034 ms  _CompileDex                                             1 calls
  4739.303 ms  _CompileJava                                            1 calls
 31375.906 ms  _CompileToDalvikWithDx                                  1 calls
     4.502 ms  _ComputeAndroidAssetsPaths                              1 calls
    39.130 ms  _ComputeAndroidResourcePaths                            1 calls
     0.744 ms  _ConvertPdbFiles                                        1 calls
     1.728 ms  _CopyAppConfigFile                                      1 calls
    29.169 ms  _CopyConfigFiles                                        1 calls
   153.116 ms  _CopyIntermediateAssemblies                             1 calls
   282.216 ms  _CopyMdbFiles                                           1 calls
 12916.033 ms  _CreateAdditionalResourceCache                          1 calls
  3877.113 ms  _CreateBaseApk                                          1 calls
     4.102 ms  _CreateIntermediateAssembliesDir                        1 calls
     0.524 ms  _CreatePackageWorkspace                                 1 calls
     0.843 ms  _CreatePropertiesCache                                  1 calls
     0.267 ms  _DefineBuildTargetAbis                                  1 calls
    29.977 ms  _DetermineJavaLibrariesToCompile                        1 calls
     2.589 ms  _ExtractLibraryProjectImports                           1 calls
   447.851 ms  _FindCompiledJavaFiles                                  1 calls
   214.552 ms  _FindJavaStubFiles                                      1 calls
    58.729 ms  _GenerateAndroidAssetsDir                               1 calls
  2465.391 ms  _GenerateAndroidResourceDir                             1 calls
 19554.993 ms  _GenerateJavaDesignerForComponent                       1 calls
  6690.174 ms  _GenerateJavaStubs                                      1 calls
    13.889 ms  _GeneratePackageManagerJava                             1 calls
     2.271 ms  _GenerateTargetFrameworkMonikerAttribute                1 calls
    16.850 ms  _GetAdditionalResourcesFromAssemblies                   1 calls
     2.272 ms  _GetAddOnPlatformLibraries                              1 calls
     0.502 ms  _GetCompileOutputsForClean                              1 calls
     2.974 ms  _GetLibraryImports                                      1 calls
     0.579 ms  _GetMonoPlatformJarPath                                 1 calls
   256.447 ms  _GetPrimaryCpuAbi                                       1 calls
     6.563 ms  _GetReferenceAssemblyPaths                              1 calls
     0.072 ms  _IncludeInstanceRunReference                            1 calls
   596.326 ms  _LinkAssembliesNoShrink                                 1 calls
    10.918 ms  _PrepareAssemblies                                      1 calls
     0.077 ms  _ReadPropertiesCache                                    1 calls
    55.570 ms  _RecordCleanFile                                        1 calls
   530.209 ms  _ResolveAssemblies                                      1 calls
  1142.915 ms  _ResolveLibraryProjectImports                           1 calls
     6.823 ms  _ResolveMonoAndroidSdks                                 1 calls
   173.457 ms  _ResolveSatellitePaths                                  1 calls
     0.814 ms  _SeparateAppExtensionReferences                         1 calls
   111.219 ms  _SetLatestTargetFrameworkVersion                        1 calls
     0.246 ms  _SetupApplicationJavaClass                              1 calls
     0.050 ms  _SetupDesignTimeBuildForBuild                           1 calls
     0.058 ms  _SetupDesignTimeBuildForIntellisense                    1 calls
     0.182 ms  _SetupInstantRun                                        1 calls
     3.529 ms  _StripEmbeddedLibraries                                 1 calls
  9173.470 ms  _UpdateAndroidResgen                                    1 calls
     3.666 ms  _ValidateAndroidPackageProperties                       1 calls
     0.334 ms  _ValidateLinkMode                                       1 calls
     0.127 ms  _ValidateResourceCache                                  1 calls
     3.506 ms  _WriteResolvedAssemblies                                1 calls
     0.136 ms  AssignLinkMetadata                                      1 calls
    10.032 ms  AssignProjectConfiguration                              5 calls
     5.861 ms  AssignTargetPaths                                       6 calls
     0.491 ms  BclBuildAddProjectReferenceProperties                   1 calls
     0.764 ms  BclBuildValidateNugetPackageReferences                  1 calls
     1.256 ms  ConfigureMultiBrandProject                              1 calls
    94.698 ms  CopyFilesMarkedCopyLocal                                1 calls
  1951.619 ms  CoreCompile                                             1 calls
     0.210 ms  CreateManifestResourceNames                             1 calls
     2.600 ms  DeployOutputFiles                                       1 calls
     0.032 ms  EnsureNuGetPackageBuildImports                          1 calls
     0.157 ms  GenerateResources                                       1 calls
     0.163 ms  GenerateSatelliteAssemblies                             1 calls
     1.774 ms  GenerateTargetFrameworkMonikerAttribute                 1 calls
  3954.499 ms  GetCopyToOutputDirectoryItems                           6 calls
    49.371 ms  GetReferenceAssemblyPaths                               1 calls
   122.024 ms  ImplicitlyExpandDesignTimeFacades                       1 calls
     0.883 ms  PrepareForBuild                                         1 calls
     0.159 ms  ProcessGoogleServicesJsonChecks                         1 calls
  2298.292 ms  ProcessMultiBrandProject                                1 calls
   139.717 ms  ResolveAssemblyReferences                               1 calls
   809.012 ms  ResolveProjectReferences                                1 calls
     5.490 ms  SplitProjectReferencesByExistent                        6 calls
     0.638 ms  SplitResourcesByCulture                                 1 calls
     0.524 ms  VectorDrawableCheckBuildToolsVersionTask                1 calls

Tasks perfomance summary:
 29192.666 ms  Aapt                                                   26 calls
   493.441 ms  AdjustJavacVersionArguments                             1 calls
    43.148 ms  AndroidComputeResPaths                                  2 calls
     0.142 ms  AssignCulture                                           1 calls
     3.865 ms  AssignProjectConfiguration                              5 calls
     5.234 ms  AssignTargetPath                                       18 calls
     1.832 ms  CalculateAdditionalResourceCacheDirectories             1 calls
     1.230 ms  CheckDuplicateJavaLibraries                             1 calls
     0.766 ms  CheckProjectItems                                       1 calls
   622.142 ms  CheckTargetFrameworks                                   1 calls
    24.383 ms  CollectLibraryAssets                                    1 calls
 21485.752 ms  CompileToDalvik                                         1 calls
  2849.454 ms  ConvertResourcesCases                                   3 calls
  2528.481 ms  Copy                                                   10 calls
    28.803 ms  CopyConfigFiles                                         1 calls
   144.185 ms  CopyGeneratedJavaResourceClasses                        2 calls
    29.499 ms  CopyIfChanged                                           1 calls
   220.276 ms  CopyMdbFiles                                            1 calls
     2.983 ms  CopyResource                                            4 calls
 12909.043 ms  CreateAdditionalLibraryResourceCache                    1 calls
     4.594 ms  CreateAndroidResourceStamp                              1 calls
  1223.739 ms  CreateItem                                             63 calls
     3.906 ms  CreateManagedLibraryResourceArchive                     1 calls
  9773.689 ms  CreateMultiDexMainDexClassList                          1 calls
     5.418 ms  CreateProperty                                         45 calls
     1.903 ms  CreateResgenManifest                                    1 calls
     1.018 ms  CreateTemporaryDirectory                                2 calls
  1935.192 ms  Csc                                                     1 calls
     0.874 ms  Delete                                                  1 calls
    24.850 ms  DetermineJavaLibrariesToCompile                         1 calls
     0.393 ms  FindAppConfigFile                                       1 calls
    12.002 ms  FindUnderPath                                           1 calls
  6288.522 ms  GenerateJavaStubs                                       1 calls
    10.127 ms  GeneratePackageManagerJava                              1 calls
   507.929 ms  GenerateResourceDesigner                                1 calls
175660.288 ms  GetAdditionalResourcesFromAssemblies                    1 calls
     2.190 ms  GetAddOnPlatformLibraries                               1 calls
     0.562 ms  GetAndroidDefineConstants                               1 calls
     1.803 ms  GetAndroidPackageName                                   1 calls
     0.663 ms  GetAppSettingsDirectory                                 1 calls
    60.787 ms  GetExtraPackages                                        2 calls
    21.901 ms  GetFilesThatExist                                       3 calls
   179.715 ms  GetImportedLibraries                                    1 calls
     0.888 ms  GetJavaPlatformJar                                      1 calls
     0.524 ms  GetMonoPlatformJar                                      1 calls
   256.057 ms  GetPrimaryCpuAbi                                        1 calls
    36.014 ms  GetReferenceAssemblyPaths                               2 calls
  4709.106 ms  Javac                                                   1 calls
   592.300 ms  LinkAssemblies                                          1 calls
     1.543 ms  MakeDir                                                 6 calls
     1.754 ms  Message                                                16 calls
  4754.145 ms  MSBuild                                                 6 calls
     4.251 ms  ReadAdditionalResourcesFromAssemblyCache                1 calls
     2.811 ms  ReadImportedLibrariesCache                              1 calls
     2.525 ms  ReadLibraryProjectImportsCache                          1 calls
     0.254 ms  ReadLinesFromFile                                       1 calls
   110.415 ms  ReadResolvedSdksCache                                   1 calls
    33.918 ms  RemoveDirFixed                                          2 calls
    33.896 ms  RemoveDuplicates                                        1 calls
    28.964 ms  RemoveUnknownFiles                                      2 calls
   516.806 ms  ResolveAssemblies                                       1 calls
   309.790 ms  ResolveAssemblyReference                                2 calls
  1122.271 ms  ResolveLibraryProjectImports                            1 calls
   280.832 ms  ResolveSdks                                             1 calls
   281.227 ms  Touch                                                  10 calls
     0.466 ms  ValidatePackageReferences                               1 calls
     0.488 ms  VectorDrawableCheckBuildToolsVersionTask                1 calls
    13.490 ms  WriteLinesToFile                                        4 calls

Build succeeded.

This is a screenshot of our buildserver where you can see quite an increase of the build time! android-compilation-increase

Diagnostics build output previous build (with support packages v23 and Android target framework 6.0)

Target perfomance summary:
     4.379 ms  _AddCorlibReference                                     1 calls
     4.000 ms  _AddDebugStaticResources                                1 calls
    10.737 ms  _AddLibraryProjectsEmbeddedResourceToProject            1 calls
     0.699 ms  _AddMultiDexDependencyJars                              1 calls
    62.400 ms  _AddStaticResources                                     1 calls
   482.713 ms  _AdjustJavacVersionArguments                            1 calls
   438.641 ms  _BuildAdditionalResourcesCache                          1 calls
   230.518 ms  _BuildLibraryImportsCache                               1 calls
   148.218 ms  _BuildSdkCache                                          1 calls
     8.501 ms  _CalculateAdditionalResourceCacheDirectories            1 calls
    10.302 ms  _CheckDuplicateJavaLibraries                            1 calls
     0.113 ms  _CheckForContent                                        1 calls
     0.239 ms  _CheckForDeletedResourceFile                            1 calls
     0.321 ms  _CheckForInvalidConfigurationAndPlatform                1 calls
     2.960 ms  _CheckInstantRunCondition                               1 calls
     2.174 ms  _CheckProjectItems                                      1 calls
     0.104 ms  _CheckTargetFramework                                   1 calls
   315.196 ms  _CheckTargetFrameworks                                  1 calls
   423.095 ms  _CollectAdditionalResourceFiles                         1 calls
    16.085 ms  _CollectConfigFiles                                     1 calls
    40.836 ms  _CollectMdbFiles                                        1 calls
    30.236 ms  _CollectMonoAndroidOutputs                              1 calls
    27.221 ms  _CollectPdbFiles                                        1 calls
     1.847 ms  _CompileDex                                             1 calls
 10801.496 ms  _CompileJava                                            1 calls
 46358.313 ms  _CompileToDalvikWithDx                                  1 calls
    28.799 ms  _ComputeAndroidAssetsPaths                              1 calls
    82.215 ms  _ComputeAndroidResourcePaths                            1 calls
     1.222 ms  _ConvertPdbFiles                                        1 calls
     3.392 ms  _CopyAppConfigFile                                      1 calls
    36.506 ms  _CopyConfigFiles                                        1 calls
   249.692 ms  _CopyIntermediateAssemblies                             1 calls
   428.036 ms  _CopyMdbFiles                                           1 calls
  2594.483 ms  _CreateAdditionalResourceCache                          1 calls
  5550.604 ms  _CreateBaseApk                                          1 calls
     8.031 ms  _CreateIntermediateAssembliesDir                        1 calls
     1.318 ms  _CreatePackageWorkspace                                 1 calls
     1.013 ms  _CreatePropertiesCache                                  1 calls
     0.494 ms  _DefineBuildTargetAbis                                  1 calls
    30.175 ms  _DetermineJavaLibrariesToCompile                        1 calls
    10.185 ms  _ExtractLibraryProjectImports                           1 calls
   514.473 ms  _FindCompiledJavaFiles                                  1 calls
   232.158 ms  _FindJavaStubFiles                                      1 calls
   150.282 ms  _GenerateAndroidAssetsDir                               1 calls
   841.423 ms  _GenerateAndroidResourceDir                             1 calls
 13573.984 ms  _GenerateJavaDesignerForComponent                       1 calls
 11625.012 ms  _GenerateJavaStubs                                      1 calls
    28.173 ms  _GeneratePackageManagerJava                             1 calls
     5.038 ms  _GenerateTargetFrameworkMonikerAttribute                1 calls
    21.895 ms  _GetAdditionalResourcesFromAssemblies                   1 calls
     6.778 ms  _GetAddOnPlatformLibraries                              1 calls
     1.328 ms  _GetCompileOutputsForClean                              1 calls
     6.341 ms  _GetLibraryImports                                      1 calls
     2.189 ms  _GetMonoPlatformJarPath                                 1 calls
   494.532 ms  _GetPrimaryCpuAbi                                       1 calls
     0.742 ms  _GetReferenceAssemblyPaths                              1 calls
     0.374 ms  _IncludeInstanceRunReference                            1 calls
  1184.081 ms  _LinkAssembliesNoShrink                                 1 calls
    22.670 ms  _PrepareAssemblies                                      1 calls
     0.098 ms  _ReadPropertiesCache                                    1 calls
    94.068 ms  _RecordCleanFile                                        1 calls
   852.572 ms  _ResolveAssemblies                                      1 calls
  1305.448 ms  _ResolveLibraryProjectImports                           1 calls
    19.616 ms  _ResolveMonoAndroidSdks                                 1 calls
   291.677 ms  _ResolveSatellitePaths                                  1 calls
     1.273 ms  _SeparateAppExtensionReferences                         1 calls
   109.174 ms  _SetLatestTargetFrameworkVersion                        1 calls
     0.416 ms  _SetupApplicationJavaClass                              1 calls
     0.065 ms  _SetupDesignTimeBuildForBuild                           1 calls
     0.165 ms  _SetupDesignTimeBuildForIntellisense                    1 calls
     0.342 ms  _SetupInstantRun                                        1 calls
     6.897 ms  _StripEmbeddedLibraries                                 1 calls
 10852.759 ms  _UpdateAndroidResgen                                    1 calls
     9.011 ms  _ValidateAndroidPackageProperties                       1 calls
     0.393 ms  _ValidateLinkMode                                       1 calls
     0.311 ms  _ValidateResourceCache                                  1 calls
     6.332 ms  _WriteResolvedAssemblies                                1 calls
     0.220 ms  AssignLinkMetadata                                      1 calls
    16.918 ms  AssignProjectConfiguration                              5 calls
    10.283 ms  AssignTargetPaths                                       6 calls
     0.858 ms  BclBuildAddProjectReferenceProperties                   1 calls
    10.772 ms  BclBuildValidateNugetPackageReferences                  1 calls
     4.868 ms  ConfigureMultiBrandProject                              1 calls
    95.253 ms  CopyFilesMarkedCopyLocal                                1 calls
  1842.395 ms  CoreCompile                                             1 calls
     0.330 ms  CreateManifestResourceNames                             1 calls
     7.176 ms  DeployOutputFiles                                       1 calls
     0.189 ms  EnsureNuGetPackageBuildImports                          1 calls
     0.251 ms  GenerateResources                                       1 calls
     0.129 ms  GenerateSatelliteAssemblies                             1 calls
     3.962 ms  GenerateTargetFrameworkMonikerAttribute                 1 calls
  6453.888 ms  GetCopyToOutputDirectoryItems                           6 calls
    26.352 ms  GetReferenceAssemblyPaths                               1 calls
   236.118 ms  ImplicitlyExpandDesignTimeFacades                       1 calls
     1.816 ms  PrepareForBuild                                         1 calls
     0.260 ms  ProcessGoogleServicesJsonChecks                         1 calls
   330.735 ms  ProcessMultiBrandProject                                1 calls
   150.458 ms  ResolveAssemblyReferences                               1 calls
  1248.670 ms  ResolveProjectReferences                                1 calls
    12.312 ms  SplitProjectReferencesByExistent                        6 calls
     1.105 ms  SplitResourcesByCulture                                 1 calls
     8.355 ms  VectorDrawableCheckBuildToolsVersionTask                1 calls

Tasks perfomance summary:
 25412.561 ms  Aapt                                                   16 calls
   482.520 ms  AdjustJavacVersionArguments                             1 calls
   110.212 ms  AndroidComputeResPaths                                  2 calls
     0.251 ms  AssignCulture                                           1 calls
     6.347 ms  AssignProjectConfiguration                              5 calls
     9.179 ms  AssignTargetPath                                       18 calls
     7.043 ms  CalculateAdditionalResourceCacheDirectories             1 calls
    10.170 ms  CheckDuplicateJavaLibraries                             1 calls
     2.060 ms  CheckProjectItems                                       1 calls
   315.010 ms  CheckTargetFrameworks                                   1 calls
     5.940 ms  CollectLibraryAssets                                    1 calls
 31621.992 ms  CompileToDalvik                                         1 calls
  4387.461 ms  ConvertResourcesCases                                   3 calls
   774.655 ms  Copy                                                   10 calls
    35.187 ms  CopyConfigFiles                                         1 calls
   195.011 ms  CopyGeneratedJavaResourceClasses                        2 calls
    30.898 ms  CopyIfChanged                                           1 calls
   323.446 ms  CopyMdbFiles                                            1 calls
     7.264 ms  CopyResource                                            4 calls
  2586.732 ms  CreateAdditionalLibraryResourceCache                    1 calls
    12.348 ms  CreateAndroidResourceStamp                              1 calls
  1251.829 ms  CreateItem                                             53 calls
    10.121 ms  CreateManagedLibraryResourceArchive                     1 calls
 14596.149 ms  CreateMultiDexMainDexClassList                          1 calls
    11.932 ms  CreateProperty                                         45 calls
    11.592 ms  CreateResgenManifest                                    1 calls
     2.396 ms  CreateTemporaryDirectory                                2 calls
  1818.611 ms  Csc                                                     1 calls
     0.645 ms  Delete                                                  1 calls
    28.270 ms  DetermineJavaLibrariesToCompile                         1 calls
     0.802 ms  FindAppConfigFile                                       1 calls
    17.906 ms  FindUnderPath                                           1 calls
 10746.108 ms  GenerateJavaStubs                                       1 calls
    20.430 ms  GeneratePackageManagerJava                              1 calls
   528.528 ms  GenerateResourceDesigner                                1 calls
   421.848 ms  GetAdditionalResourcesFromAssemblies                    1 calls
     6.618 ms  GetAddOnPlatformLibraries                               1 calls
     5.700 ms  GetAndroidDefineConstants                               1 calls
     1.352 ms  GetAndroidPackageName                                   1 calls
     1.873 ms  GetAppSettingsDirectory                                 1 calls
    58.472 ms  GetExtraPackages                                        2 calls
    39.167 ms  GetFilesThatExist                                       3 calls
   211.032 ms  GetImportedLibraries                                    1 calls
     6.334 ms  GetJavaPlatformJar                                      1 calls
     2.089 ms  GetMonoPlatformJar                                      1 calls
   493.396 ms  GetPrimaryCpuAbi                                        1 calls
     5.440 ms  GetReferenceAssemblyPaths                               2 calls
 10759.122 ms  Javac                                                   1 calls
  1175.008 ms  LinkAssemblies                                          1 calls
     3.648 ms  MakeDir                                                 6 calls
     2.688 ms  Message                                                16 calls
  7680.181 ms  MSBuild                                                 6 calls
     5.400 ms  ReadAdditionalResourcesFromAssemblyCache                1 calls
     6.025 ms  ReadImportedLibrariesCache                              1 calls
    10.075 ms  ReadLibraryProjectImportsCache                          1 calls
     0.658 ms  ReadLinesFromFile                                       1 calls
   107.749 ms  ReadResolvedSdksCache                                   1 calls
    43.802 ms  RemoveDirFixed                                          2 calls
    66.148 ms  RemoveDuplicates                                        1 calls
    61.685 ms  RemoveUnknownFiles                                      2 calls
   826.402 ms  ResolveAssemblies                                       1 calls
   436.710 ms  ResolveAssemblyReference                                2 calls
  1281.816 ms  ResolveLibraryProjectImports                            1 calls
   147.881 ms  ResolveSdks                                             1 calls
   667.213 ms  Touch                                                  10 calls
    10.288 ms  ValidatePackageReferences                               1 calls
     8.281 ms  VectorDrawableCheckBuildToolsVersionTask                1 calls
    16.510 ms  WriteLinesToFile    

Both were done with a Clean and Rebuild.

Redth commented 7 years ago

Do you have the same diagnostic timing output from the previous version of support libraries?

thomasvdb commented 7 years ago

@Redth I've updated the original issue with timings from a previous version

Redth commented 7 years ago

Just noting that it seems GetAdditionalResourcesFromAssemblies is the main culprit in the additional time increase.

sdebruyn commented 7 years ago

@Redth What does this step exactly do? How can we significantly decrease this?

Redth commented 7 years ago

Likely one of two possible issues.

  1. Make sure you're on the latest stable version of Xamarin.Android. There was a patch where calculating hashes in this task was taking longer than needed.

  2. 24.2.1 still uses a build time technique to download and cache the actual maven repository .zip of the support libraries from Google. I'm not sure what your build environment looks like but if the cache isn't being maintained, or you have multiple build bots that haven't all downloaded and cached this file yet, that could also help explain it.

We are actively working on making point 2 much better by introducing a new download mechanism for these files. We're not too far away from releasing these updates (let's say weeks).

sdebruyn commented 7 years ago

@Redth All of our machines are on Xamarin.Android 7.0.2.37

Where is this cache stored? Due to a few bugs in Xamarin Studio, we have to clean/rebuild our app a couple of times a day. I'm not sure that this is the issue since we haven't changed our build setup during the upgrade.

Redth commented 7 years ago

Right now, the caches will be in: ~/.local/share/Xamarin/

Is it possible your bots haven't all built and downloaded to the cache yet? I'd expect this build time to speed up once things are stable in the cache.

sdebruyn commented 7 years ago

Oh, I see, those are the zips that get downloaded when you use a support package for the first time. All of our machines should already have that cache. We have only 2 build bots and they should already have the required cache, but the issue also occurs on our development machines.

If the cache would be the culprit, would this also happen the second time we run a build? Right now, it happens every time...

Redth commented 7 years ago

It shouldn't happen every build if the cache was downloaded and extracted properly....

sdebruyn commented 7 years ago

From which server should it download those zips? Just noticed that there are a few calls to dc.services.visualstudio.com during the build. Is this normal behavior? I'll clear the cache on my machine and I'll get back with an update in about 30 minutes.

Redth commented 7 years ago

It should be downloading them from Google's servers https://dl-ssl.google.com/android/repository/...

sdebruyn commented 7 years ago

Clearing the cache didn't help. This is what I tried:

  1. Clear solution, clear the cache, run a build: long build time
  2. Build app: short build time
  3. Rebuild app: long build time

First build:

Target perfomance summary:
     2,819 ms  _AddCorlibReference                                     1 calls
     1,916 ms  _AddDebugStaticResources                                1 calls
     9,367 ms  _AddLibraryProjectsEmbeddedResourceToProject            1 calls
     0,563 ms  _AddMultiDexDependencyJars                              1 calls
     4,562 ms  _AddStaticResources                                     1 calls
   355,184 ms  _AdjustJavacVersionArguments                            1 calls
193246,266 ms  _BuildAdditionalResourcesCache                          1 calls
   179,931 ms  _BuildLibraryImportsCache                               1 calls
   220,619 ms  _BuildSdkCache                                          1 calls
     2,863 ms  _CalculateAdditionalResourceCacheDirectories            1 calls
     1,492 ms  _CheckDuplicateJavaLibraries                            1 calls
     0,082 ms  _CheckForContent                                        1 calls
     0,162 ms  _CheckForDeletedResourceFile                            1 calls
     0,166 ms  _CheckForInvalidConfigurationAndPlatform                1 calls
     0,775 ms  _CheckInstantRunCondition                               1 calls
     1,489 ms  _CheckProjectItems                                      1 calls
     0,077 ms  _CheckTargetFramework                                   1 calls
   142,531 ms  _CheckTargetFrameworks                                  1 calls
   397,416 ms  _CollectAdditionalResourceFiles                         1 calls
     8,092 ms  _CollectConfigFiles                                     1 calls
    17,140 ms  _CollectMdbFiles                                        1 calls
    14,656 ms  _CollectMonoAndroidOutputs                              1 calls
    12,712 ms  _CollectPdbFiles                                        1 calls
     1,499 ms  _CompileDex                                             1 calls
  4836,066 ms  _CompileJava                                            1 calls
 28346,845 ms  _CompileToDalvikWithDx                                  1 calls
     5,951 ms  _ComputeAndroidAssetsPaths                              1 calls
    40,600 ms  _ComputeAndroidResourcePaths                            1 calls
     0,681 ms  _ConvertPdbFiles                                        1 calls
     2,984 ms  _CopyAppConfigFile                                      1 calls
     5,987 ms  _CopyConfigFiles                                        1 calls
   154,079 ms  _CopyIntermediateAssemblies                             1 calls
   139,750 ms  _CopyMdbFiles                                           1 calls
  1150,381 ms  _CreateAdditionalResourceCache                          1 calls
  2496,262 ms  _CreateBaseApk                                          1 calls
    11,003 ms  _CreateIntermediateAssembliesDir                        1 calls
     0,461 ms  _CreatePackageWorkspace                                 1 calls
     1,312 ms  _CreatePropertiesCache                                  1 calls
     0,266 ms  _DefineBuildTargetAbis                                  1 calls
    27,993 ms  _DetermineJavaLibrariesToCompile                        1 calls
     2,506 ms  _ExtractLibraryProjectImports                           1 calls
   427,773 ms  _FindCompiledJavaFiles                                  1 calls
   187,684 ms  _FindJavaStubFiles                                      1 calls
    26,816 ms  _GenerateAndroidAssetsDir                               1 calls
    17,632 ms  _GenerateAndroidResourceDir                             1 calls
 16531,850 ms  _GenerateJavaDesignerForComponent                       1 calls
  1016,821 ms  _GenerateJavaStubs                                      1 calls
    10,949 ms  _GeneratePackageManagerJava                             1 calls
     2,586 ms  _GenerateTargetFrameworkMonikerAttribute                1 calls
    16,612 ms  _GetAdditionalResourcesFromAssemblies                   1 calls
     2,657 ms  _GetAddOnPlatformLibraries                              1 calls
     0,532 ms  _GetCompileOutputsForClean                              1 calls
     2,063 ms  _GetLibraryImports                                      1 calls
     1,474 ms  _GetMonoPlatformJarPath                                 1 calls
   154,664 ms  _GetPrimaryCpuAbi                                       1 calls
     0,481 ms  _GetReferenceAssemblyPaths                              1 calls
     0,071 ms  _IncludeInstanceRunReference                            1 calls
   552,345 ms  _LinkAssembliesNoShrink                                 1 calls
    11,879 ms  _PrepareAssemblies                                      1 calls
     0,090 ms  _ReadPropertiesCache                                    1 calls
    45,247 ms  _RecordCleanFile                                        1 calls
   392,661 ms  _ResolveAssemblies                                      1 calls
   540,920 ms  _ResolveLibraryProjectImports                           1 calls
     5,876 ms  _ResolveMonoAndroidSdks                                 1 calls
   139,848 ms  _ResolveSatellitePaths                                  1 calls
     0,833 ms  _SeparateAppExtensionReferences                         1 calls
   108,426 ms  _SetLatestTargetFrameworkVersion                        1 calls
     0,245 ms  _SetupApplicationJavaClass                              1 calls
     0,079 ms  _SetupDesignTimeBuildForBuild                           1 calls
     0,114 ms  _SetupDesignTimeBuildForIntellisense                    1 calls
     0,242 ms  _SetupInstantRun                                        1 calls
     3,429 ms  _StripEmbeddedLibraries                                 1 calls
  4923,127 ms  _UpdateAndroidResgen                                    1 calls
     2,649 ms  _ValidateAndroidPackageProperties                       1 calls
     0,516 ms  _ValidateLinkMode                                       1 calls
     0,202 ms  _ValidateResourceCache                                  1 calls
     3,762 ms  _WriteResolvedAssemblies                                1 calls
     0,150 ms  AssignLinkMetadata                                      1 calls
    15,141 ms  AssignProjectConfiguration                              5 calls
     6,263 ms  AssignTargetPaths                                       6 calls
     0,592 ms  BclBuildAddProjectReferenceProperties                   1 calls
     0,996 ms  BclBuildValidateNugetPackageReferences                  1 calls
     2,134 ms  ConfigureMultiBrandProject                              1 calls
    71,315 ms  CopyFilesMarkedCopyLocal                                1 calls
  1044,606 ms  CoreCompile                                             1 calls
     0,206 ms  CreateManifestResourceNames                             1 calls
     3,138 ms  DeployOutputFiles                                       1 calls
     0,038 ms  EnsureNuGetPackageBuildImports                          1 calls
     0,176 ms  GenerateResources                                       1 calls
     0,157 ms  GenerateSatelliteAssemblies                             1 calls
     1,958 ms  GenerateTargetFrameworkMonikerAttribute                 1 calls
  3547,365 ms  GetCopyToOutputDirectoryItems                           6 calls
    17,145 ms  GetReferenceAssemblyPaths                               1 calls
   112,989 ms  ImplicitlyExpandDesignTimeFacades                       1 calls
     1,078 ms  PrepareForBuild                                         1 calls
     0,184 ms  ProcessGoogleServicesJsonChecks                         1 calls
   259,484 ms  ProcessMultiBrandProject                                1 calls
   110,617 ms  ResolveAssemblyReferences                               1 calls
   744,355 ms  ResolveProjectReferences                                1 calls
     6,102 ms  SplitProjectReferencesByExistent                        6 calls
     0,737 ms  SplitResourcesByCulture                                 1 calls
     0,788 ms  VectorDrawableCheckBuildToolsVersionTask                1 calls

Tasks perfomance summary:
 22659,525 ms  Aapt                                                   26 calls
   355,057 ms  AdjustJavacVersionArguments                             1 calls
    45,973 ms  AndroidComputeResPaths                                  2 calls
     0,141 ms  AssignCulture                                           1 calls
     4,433 ms  AssignProjectConfiguration                              5 calls
     5,592 ms  AssignTargetPath                                       18 calls
     1,811 ms  CalculateAdditionalResourceCacheDirectories             1 calls
     1,415 ms  CheckDuplicateJavaLibraries                             1 calls
     1,413 ms  CheckProjectItems                                       1 calls
   142,465 ms  CheckTargetFrameworks                                   1 calls
     3,286 ms  CollectLibraryAssets                                    1 calls
 21715,435 ms  CompileToDalvik                                         1 calls
   908,350 ms  ConvertResourcesCases                                   3 calls
   276,861 ms  Copy                                                    9 calls
     5,670 ms  CopyConfigFiles                                         1 calls
    35,736 ms  CopyGeneratedJavaResourceClasses                        2 calls
    20,629 ms  CopyIfChanged                                           1 calls
   108,136 ms  CopyMdbFiles                                            1 calls
     2,873 ms  CopyResource                                            4 calls
  1100,466 ms  CreateAdditionalLibraryResourceCache                    1 calls
     4,448 ms  CreateAndroidResourceStamp                              1 calls
  1052,619 ms  CreateItem                                             63 calls
     9,160 ms  CreateManagedLibraryResourceArchive                     1 calls
  6529,077 ms  CreateMultiDexMainDexClassList                          1 calls
     4,915 ms  CreateProperty                                         44 calls
     1,041 ms  CreateResgenManifest                                    1 calls
     2,015 ms  CreateTemporaryDirectory                                2 calls
  1031,046 ms  Csc                                                     1 calls
     0,342 ms  Delete                                                  1 calls
    26,358 ms  DetermineJavaLibrariesToCompile                         1 calls
     0,449 ms  FindAppConfigFile                                       1 calls
     9,018 ms  FindUnderPath                                           1 calls
   833,992 ms  GenerateJavaStubs                                       1 calls
     7,336 ms  GeneratePackageManagerJava                              1 calls
   289,728 ms  GenerateResourceDesigner                                1 calls
193233,570 ms  GetAdditionalResourcesFromAssemblies                    1 calls
     2,588 ms  GetAddOnPlatformLibraries                               1 calls
     0,550 ms  GetAndroidDefineConstants                               1 calls
     1,195 ms  GetAndroidPackageName                                   1 calls
     0,493 ms  GetAppSettingsDirectory                                 1 calls
    28,190 ms  GetExtraPackages                                        2 calls
    20,443 ms  GetFilesThatExist                                       3 calls
   161,022 ms  GetImportedLibraries                                    1 calls
     0,658 ms  GetJavaPlatformJar                                      1 calls
     1,416 ms  GetMonoPlatformJar                                      1 calls
   154,368 ms  GetPrimaryCpuAbi                                        1 calls
     2,740 ms  GetReferenceAssemblyPaths                               2 calls
  4806,161 ms  Javac                                                   1 calls
   548,591 ms  LinkAssemblies                                          1 calls
     2,274 ms  MakeDir                                                 7 calls
     1,757 ms  Message                                                16 calls
     0,426 ms  MHBrandTask                                             1 calls
     0,285 ms  MHBuildModeTask                                         1 calls
     1,338 ms  MHBundleIdentifierTask                                  1 calls
    20,532 ms  MHManifestTask                                          4 calls
   230,616 ms  MHMultiBrandCopyTask                                    4 calls
     1,861 ms  MHReadPermissionsForManifestTask                        1 calls
     4,341 ms  MHReadSettingsForManifestTask                           1 calls
     1,737 ms  MHValueReplaceManifestTask                              1 calls
  4281,849 ms  MSBuild                                                 6 calls
    10,481 ms  ReadAdditionalResourcesFromAssemblyCache                1 calls
     1,894 ms  ReadImportedLibrariesCache                              1 calls
     2,416 ms  ReadLibraryProjectImportsCache                          1 calls
     0,243 ms  ReadLinesFromFile                                       1 calls
   107,520 ms  ReadResolvedSdksCache                                   1 calls
    28,303 ms  RemoveDirFixed                                          2 calls
    31,329 ms  RemoveDuplicates                                        1 calls
     4,171 ms  RemoveUnknownFiles                                      1 calls
   379,417 ms  ResolveAssemblies                                       1 calls
   246,631 ms  ResolveAssemblyReference                                2 calls
   526,170 ms  ResolveLibraryProjectImports                            1 calls
   220,374 ms  ResolveSdks                                             1 calls
    55,939 ms  Touch                                                   9 calls
     0,563 ms  ValidatePackageReferences                               1 calls
     0,726 ms  VectorDrawableCheckBuildToolsVersionTask                1 calls
     9,105 ms  WriteLinesToFile                                        4 calls

Build succeeded.

Second build:

Target perfomance summary:
     2,327 ms  _AddCorlibReference                                     1 calls
     0,717 ms  _AddDebugStaticResources                                1 calls
     5,789 ms  _AddLibraryProjectsEmbeddedResourceToProject            1 calls
     0,333 ms  _AddMultiDexDependencyJars                              1 calls
     0,335 ms  _AddStaticResources                                     1 calls
   160,947 ms  _AdjustJavacVersionArguments                            1 calls
    10,740 ms  _BuildAdditionalResourcesCache                          1 calls
    11,151 ms  _BuildLibraryImportsCache                               1 calls
     0,532 ms  _BuildSdkCache                                          1 calls
     2,701 ms  _CalculateAdditionalResourceCacheDirectories            1 calls
     1,058 ms  _CheckDuplicateJavaLibraries                            1 calls
     0,079 ms  _CheckForContent                                        1 calls
     0,155 ms  _CheckForDeletedResourceFile                            1 calls
     0,145 ms  _CheckForInvalidConfigurationAndPlatform                1 calls
     0,811 ms  _CheckInstantRunCondition                               1 calls
     0,859 ms  _CheckProjectItems                                      1 calls
     0,076 ms  _CheckTargetFramework                                   1 calls
   100,754 ms  _CheckTargetFrameworks                                  1 calls
   393,974 ms  _CollectAdditionalResourceFiles                         1 calls
     9,431 ms  _CollectConfigFiles                                     1 calls
    15,408 ms  _CollectMdbFiles                                        1 calls
    14,904 ms  _CollectMonoAndroidOutputs                              1 calls
    10,630 ms  _CollectPdbFiles                                        1 calls
     0,969 ms  _CompileDex                                             1 calls
    27,266 ms  _CompileJava                                            1 calls
    95,056 ms  _CompileToDalvikWithDx                                  1 calls
     4,451 ms  _ComputeAndroidAssetsPaths                              1 calls
    34,588 ms  _ComputeAndroidResourcePaths                            1 calls
     0,621 ms  _ConvertPdbFiles                                        1 calls
     0,241 ms  _CopyAppConfigFile                                      1 calls
     0,722 ms  _CopyConfigFiles                                        1 calls
    23,059 ms  _CopyIntermediateAssemblies                             1 calls
     1,827 ms  _CopyMdbFiles                                           1 calls
     1,532 ms  _CreateAdditionalResourceCache                          1 calls
     8,170 ms  _CreateBaseApk                                          1 calls
     5,114 ms  _CreateIntermediateAssembliesDir                        1 calls
     0,356 ms  _CreatePackageWorkspace                                 1 calls
     0,252 ms  _CreatePropertiesCache                                  1 calls
     0,262 ms  _DefineBuildTargetAbis                                  1 calls
    23,939 ms  _DetermineJavaLibrariesToCompile                        1 calls
     1,809 ms  _ExtractLibraryProjectImports                           1 calls
   355,770 ms  _FindCompiledJavaFiles                                  1 calls
   177,221 ms  _FindJavaStubFiles                                      1 calls
     2,483 ms  _GenerateAndroidAssetsDir                               1 calls
    16,414 ms  _GenerateAndroidResourceDir                             1 calls
    92,416 ms  _GenerateJavaDesignerForComponent                       1 calls
   815,156 ms  _GenerateJavaStubs                                      1 calls
     3,243 ms  _GeneratePackageManagerJava                             1 calls
     1,810 ms  _GenerateTargetFrameworkMonikerAttribute                1 calls
     6,551 ms  _GetAdditionalResourcesFromAssemblies                   1 calls
     1,860 ms  _GetAddOnPlatformLibraries                              1 calls
     0,467 ms  _GetCompileOutputsForClean                              1 calls
     4,354 ms  _GetLibraryImports                                      1 calls
     0,519 ms  _GetMonoPlatformJarPath                                 1 calls
   184,294 ms  _GetPrimaryCpuAbi                                       1 calls
     0,452 ms  _GetReferenceAssemblyPaths                              1 calls
     0,067 ms  _IncludeInstanceRunReference                            1 calls
   381,851 ms  _LinkAssembliesNoShrink                                 1 calls
    13,119 ms  _PrepareAssemblies                                      1 calls
     0,428 ms  _ReadPropertiesCache                                    1 calls
    42,826 ms  _RecordCleanFile                                        1 calls
   399,061 ms  _ResolveAssemblies                                      1 calls
    12,209 ms  _ResolveLibraryProjectImports                           1 calls
     8,243 ms  _ResolveMonoAndroidSdks                                 1 calls
   133,027 ms  _ResolveSatellitePaths                                  1 calls
     0,827 ms  _SeparateAppExtensionReferences                         1 calls
   113,596 ms  _SetLatestTargetFrameworkVersion                        1 calls
     0,313 ms  _SetupApplicationJavaClass                              1 calls
     0,050 ms  _SetupDesignTimeBuildForBuild                           1 calls
     0,061 ms  _SetupDesignTimeBuildForIntellisense                    1 calls
     0,295 ms  _SetupInstantRun                                        1 calls
     2,902 ms  _StripEmbeddedLibraries                                 1 calls
    24,368 ms  _UpdateAndroidResgen                                    1 calls
     3,724 ms  _ValidateAndroidPackageProperties                       1 calls
     0,291 ms  _ValidateLinkMode                                       1 calls
     1,246 ms  _ValidateResourceCache                                  1 calls
     3,180 ms  _WriteResolvedAssemblies                                1 calls
     0,155 ms  AssignLinkMetadata                                      1 calls
     9,766 ms  AssignProjectConfiguration                              5 calls
     5,277 ms  AssignTargetPaths                                       6 calls
     0,468 ms  BclBuildAddProjectReferenceProperties                   1 calls
     1,128 ms  BclBuildValidateNugetPackageReferences                  1 calls
     1,186 ms  ConfigureMultiBrandProject                              1 calls
    24,411 ms  CopyFilesMarkedCopyLocal                                1 calls
    13,096 ms  CoreCompile                                             1 calls
     0,178 ms  CreateManifestResourceNames                             1 calls
     1,063 ms  DeployOutputFiles                                       1 calls
     0,039 ms  EnsureNuGetPackageBuildImports                          1 calls
     0,137 ms  GenerateResources                                       1 calls
     0,070 ms  GenerateSatelliteAssemblies                             1 calls
     1,731 ms  GenerateTargetFrameworkMonikerAttribute                 1 calls
  3562,993 ms  GetCopyToOutputDirectoryItems                           6 calls
    18,777 ms  GetReferenceAssemblyPaths                               1 calls
   106,956 ms  ImplicitlyExpandDesignTimeFacades                       1 calls
     1,054 ms  PrepareForBuild                                         1 calls
     0,186 ms  ProcessGoogleServicesJsonChecks                         1 calls
   122,340 ms  ProcessMultiBrandProject                                1 calls
   102,982 ms  ResolveAssemblyReferences                               1 calls
   727,194 ms  ResolveProjectReferences                                1 calls
     5,618 ms  SplitProjectReferencesByExistent                        6 calls
     0,600 ms  SplitResourcesByCulture                                 1 calls
     0,494 ms  VectorDrawableCheckBuildToolsVersionTask                1 calls

Tasks perfomance summary:
   160,838 ms  AdjustJavacVersionArguments                             1 calls
    38,751 ms  AndroidComputeResPaths                                  2 calls
     0,138 ms  AssignCulture                                           1 calls
     3,632 ms  AssignProjectConfiguration                              5 calls
     4,730 ms  AssignTargetPath                                       18 calls
     1,588 ms  CalculateAdditionalResourceCacheDirectories             1 calls
     1,007 ms  CheckDuplicateJavaLibraries                             1 calls
     0,778 ms  CheckProjectItems                                       1 calls
   100,692 ms  CheckTargetFrameworks                                   1 calls
   155,224 ms  ConvertResourcesCases                                   1 calls
    43,024 ms  Copy                                                    5 calls
     0,510 ms  CopyResource                                            1 calls
   966,474 ms  CreateItem                                             63 calls
     5,619 ms  CreateManagedLibraryResourceArchive                     1 calls
     7,315 ms  CreateProperty                                         43 calls
    22,666 ms  DetermineJavaLibrariesToCompile                         1 calls
     0,451 ms  FindAppConfigFile                                       1 calls
     6,962 ms  FindUnderPath                                           1 calls
   657,836 ms  GenerateJavaStubs                                       1 calls
     1,800 ms  GetAddOnPlatformLibraries                               1 calls
     0,516 ms  GetAndroidDefineConstants                               1 calls
     1,572 ms  GetAndroidPackageName                                   1 calls
     0,446 ms  GetAppSettingsDirectory                                 1 calls
    17,111 ms  GetFilesThatExist                                       3 calls
     1,046 ms  GetJavaPlatformJar                                      1 calls
     0,466 ms  GetMonoPlatformJar                                      1 calls
   183,852 ms  GetPrimaryCpuAbi                                        1 calls
     2,780 ms  GetReferenceAssemblyPaths                               2 calls
   378,250 ms  LinkAssemblies                                          1 calls
     0,783 ms  MakeDir                                                 4 calls
     1,767 ms  Message                                                16 calls
     0,410 ms  MHBrandTask                                             1 calls
     0,324 ms  MHBuildModeTask                                         1 calls
     0,368 ms  MHBundleIdentifierTask                                  1 calls
     2,119 ms  MHManifestTask                                          4 calls
   117,406 ms  MHMultiBrandCopyTask                                    4 calls
     0,583 ms  MHReadPermissionsForManifestTask                        1 calls
     1,324 ms  MHReadSettingsForManifestTask                           1 calls
     0,604 ms  MHValueReplaceManifestTask                              1 calls
  4281,260 ms  MSBuild                                                 6 calls
     2,594 ms  ReadAdditionalResourcesFromAssemblyCache                2 calls
     4,204 ms  ReadImportedLibrariesCache                              1 calls
     1,748 ms  ReadLibraryProjectImportsCache                          1 calls
     7,181 ms  ReadLinesFromFile                                       2 calls
   112,753 ms  ReadResolvedSdksCache                                   1 calls
    27,453 ms  RemoveDuplicates                                        1 calls
   385,580 ms  ResolveAssemblies                                       1 calls
   232,627 ms  ResolveAssemblyReference                                2 calls
     0,310 ms  Touch                                                   1 calls
     0,669 ms  ValidatePackageReferences                               1 calls
     0,463 ms  VectorDrawableCheckBuildToolsVersionTask                1 calls
     4,326 ms  WriteLinesToFile                                        2 calls

Build succeeded.

Third build:

Target perfomance summary:
     4,770 ms  _AddCorlibReference                                     1 calls
     0,990 ms  _AddDebugStaticResources                                1 calls
     4,004 ms  _AddLibraryProjectsEmbeddedResourceToProject            1 calls
     0,370 ms  _AddMultiDexDependencyJars                              1 calls
     2,362 ms  _AddStaticResources                                     1 calls
   162,326 ms  _AdjustJavacVersionArguments                            1 calls
172840,912 ms  _BuildAdditionalResourcesCache                          1 calls
   186,629 ms  _BuildLibraryImportsCache                               1 calls
   163,196 ms  _BuildSdkCache                                          1 calls
     2,896 ms  _CalculateAdditionalResourceCacheDirectories            1 calls
     1,591 ms  _CheckDuplicateJavaLibraries                            1 calls
     0,127 ms  _CheckForContent                                        1 calls
     0,146 ms  _CheckForDeletedResourceFile                            1 calls
     0,176 ms  _CheckForInvalidConfigurationAndPlatform                1 calls
     0,799 ms  _CheckInstantRunCondition                               1 calls
     0,815 ms  _CheckProjectItems                                      1 calls
     0,079 ms  _CheckTargetFramework                                   1 calls
   137,213 ms  _CheckTargetFrameworks                                  1 calls
   417,298 ms  _CollectAdditionalResourceFiles                         1 calls
     7,610 ms  _CollectConfigFiles                                     1 calls
    20,110 ms  _CollectMdbFiles                                        1 calls
    12,545 ms  _CollectMonoAndroidOutputs                              1 calls
    12,038 ms  _CollectPdbFiles                                        1 calls
     1,370 ms  _CompileDex                                             1 calls
  3730,378 ms  _CompileJava                                            1 calls
 28851,987 ms  _CompileToDalvikWithDx                                  1 calls
     5,205 ms  _ComputeAndroidAssetsPaths                              1 calls
    46,040 ms  _ComputeAndroidResourcePaths                            1 calls
     0,602 ms  _ConvertPdbFiles                                        1 calls
     0,869 ms  _CopyAppConfigFile                                      1 calls
     4,173 ms  _CopyConfigFiles                                        1 calls
   139,146 ms  _CopyIntermediateAssemblies                             1 calls
    68,650 ms  _CopyMdbFiles                                           1 calls
   911,160 ms  _CreateAdditionalResourceCache                          1 calls
  2341,195 ms  _CreateBaseApk                                          1 calls
     3,768 ms  _CreateIntermediateAssembliesDir                        1 calls
     0,506 ms  _CreatePackageWorkspace                                 1 calls
     1,495 ms  _CreatePropertiesCache                                  1 calls
     0,300 ms  _DefineBuildTargetAbis                                  1 calls
    26,121 ms  _DetermineJavaLibrariesToCompile                        1 calls
     2,583 ms  _ExtractLibraryProjectImports                           1 calls
   395,829 ms  _FindCompiledJavaFiles                                  1 calls
   178,725 ms  _FindJavaStubFiles                                      1 calls
    30,621 ms  _GenerateAndroidAssetsDir                               1 calls
   171,617 ms  _GenerateAndroidResourceDir                             1 calls
 17411,891 ms  _GenerateJavaDesignerForComponent                       1 calls
   902,308 ms  _GenerateJavaStubs                                      1 calls
     9,658 ms  _GeneratePackageManagerJava                             1 calls
     2,352 ms  _GenerateTargetFrameworkMonikerAttribute                1 calls
    10,414 ms  _GetAdditionalResourcesFromAssemblies                   1 calls
     2,012 ms  _GetAddOnPlatformLibraries                              1 calls
     0,488 ms  _GetCompileOutputsForClean                              1 calls
     2,424 ms  _GetLibraryImports                                      1 calls
     0,499 ms  _GetMonoPlatformJarPath                                 1 calls
   180,245 ms  _GetPrimaryCpuAbi                                       1 calls
     0,712 ms  _GetReferenceAssemblyPaths                              1 calls
     0,076 ms  _IncludeInstanceRunReference                            1 calls
   482,886 ms  _LinkAssembliesNoShrink                                 1 calls
    12,972 ms  _PrepareAssemblies                                      1 calls
     0,093 ms  _ReadPropertiesCache                                    1 calls
    51,451 ms  _RecordCleanFile                                        1 calls
   329,448 ms  _ResolveAssemblies                                      1 calls
   452,192 ms  _ResolveLibraryProjectImports                           1 calls
     7,182 ms  _ResolveMonoAndroidSdks                                 1 calls
   120,515 ms  _ResolveSatellitePaths                                  1 calls
     0,822 ms  _SeparateAppExtensionReferences                         1 calls
   112,450 ms  _SetLatestTargetFrameworkVersion                        1 calls
     0,317 ms  _SetupApplicationJavaClass                              1 calls
     0,073 ms  _SetupDesignTimeBuildForBuild                           1 calls
     0,121 ms  _SetupDesignTimeBuildForIntellisense                    1 calls
     0,346 ms  _SetupInstantRun                                        1 calls
     3,343 ms  _StripEmbeddedLibraries                                 1 calls
  4730,028 ms  _UpdateAndroidResgen                                    1 calls
     2,689 ms  _ValidateAndroidPackageProperties                       1 calls
     0,421 ms  _ValidateLinkMode                                       1 calls
     0,215 ms  _ValidateResourceCache                                  1 calls
     3,345 ms  _WriteResolvedAssemblies                                1 calls
     0,154 ms  AssignLinkMetadata                                      1 calls
     9,534 ms  AssignProjectConfiguration                              5 calls
     5,629 ms  AssignTargetPaths                                       6 calls
     0,474 ms  BclBuildAddProjectReferenceProperties                   1 calls
     0,890 ms  BclBuildValidateNugetPackageReferences                  1 calls
     1,183 ms  ConfigureMultiBrandProject                              1 calls
    69,932 ms  CopyFilesMarkedCopyLocal                                1 calls
  1003,065 ms  CoreCompile                                             1 calls
     0,254 ms  CreateManifestResourceNames                             1 calls
     2,348 ms  DeployOutputFiles                                       1 calls
     0,036 ms  EnsureNuGetPackageBuildImports                          1 calls
     0,152 ms  GenerateResources                                       1 calls
     0,077 ms  GenerateSatelliteAssemblies                             1 calls
     2,010 ms  GenerateTargetFrameworkMonikerAttribute                 1 calls
  3361,823 ms  GetCopyToOutputDirectoryItems                           6 calls
    19,747 ms  GetReferenceAssemblyPaths                               1 calls
   119,842 ms  ImplicitlyExpandDesignTimeFacades                       1 calls
     1,073 ms  PrepareForBuild                                         1 calls
     0,209 ms  ProcessGoogleServicesJsonChecks                         1 calls
   128,352 ms  ProcessMultiBrandProject                                1 calls
   113,728 ms  ResolveAssemblyReferences                               1 calls
   828,919 ms  ResolveProjectReferences                                1 calls
     5,968 ms  SplitProjectReferencesByExistent                        6 calls
     0,644 ms  SplitResourcesByCulture                                 1 calls
     0,618 ms  VectorDrawableCheckBuildToolsVersionTask                1 calls

Tasks perfomance summary:
 23170,297 ms  Aapt                                                   26 calls
   162,237 ms  AdjustJavacVersionArguments                             1 calls
    50,783 ms  AndroidComputeResPaths                                  2 calls
     0,143 ms  AssignCulture                                           1 calls
     3,667 ms  AssignProjectConfiguration                              5 calls
     5,037 ms  AssignTargetPath                                       18 calls
     1,808 ms  CalculateAdditionalResourceCacheDirectories             1 calls
     1,491 ms  CheckDuplicateJavaLibraries                             1 calls
     0,742 ms  CheckProjectItems                                       1 calls
   137,152 ms  CheckTargetFrameworks                                   1 calls
     2,809 ms  CollectLibraryAssets                                    1 calls
 22293,503 ms  CompileToDalvik                                         1 calls
  1012,823 ms  ConvertResourcesCases                                   3 calls
   367,182 ms  Copy                                                   10 calls
     3,748 ms  CopyConfigFiles                                         1 calls
    34,884 ms  CopyGeneratedJavaResourceClasses                        2 calls
    19,787 ms  CopyIfChanged                                           1 calls
    37,224 ms  CopyMdbFiles                                            1 calls
     1,601 ms  CopyResource                                            4 calls
   903,384 ms  CreateAdditionalLibraryResourceCache                    1 calls
     3,836 ms  CreateAndroidResourceStamp                              1 calls
  1031,115 ms  CreateItem                                             63 calls
     3,841 ms  CreateManagedLibraryResourceArchive                     1 calls
  6455,615 ms  CreateMultiDexMainDexClassList                          1 calls
     5,453 ms  CreateProperty                                         44 calls
     2,609 ms  CreateResgenManifest                                    1 calls
     0,951 ms  CreateTemporaryDirectory                                2 calls
   984,848 ms  Csc                                                     1 calls
     0,341 ms  Delete                                                  1 calls
    24,636 ms  DetermineJavaLibrariesToCompile                         1 calls
     0,455 ms  FindAppConfigFile                                       1 calls
     8,907 ms  FindUnderPath                                           1 calls
   717,921 ms  GenerateJavaStubs                                       1 calls
     4,398 ms  GeneratePackageManagerJava                              1 calls
   234,444 ms  GenerateResourceDesigner                                1 calls
172824,233 ms  GetAdditionalResourcesFromAssemblies                    1 calls
     1,953 ms  GetAddOnPlatformLibraries                               1 calls
     0,931 ms  GetAndroidDefineConstants                               1 calls
     1,158 ms  GetAndroidPackageName                                   1 calls
     0,511 ms  GetAppSettingsDirectory                                 1 calls
    24,556 ms  GetExtraPackages                                        2 calls
    17,170 ms  GetFilesThatExist                                       3 calls
   172,562 ms  GetImportedLibraries                                    1 calls
     0,674 ms  GetJavaPlatformJar                                      1 calls
     0,446 ms  GetMonoPlatformJar                                      1 calls
   179,857 ms  GetPrimaryCpuAbi                                        1 calls
     3,414 ms  GetReferenceAssemblyPaths                               2 calls
  3703,701 ms  Javac                                                   1 calls
   479,121 ms  LinkAssemblies                                          1 calls
     2,131 ms  MakeDir                                                 7 calls
     2,215 ms  Message                                                16 calls
     0,451 ms  MHBrandTask                                             1 calls
     0,306 ms  MHBuildModeTask                                         1 calls
     0,338 ms  MHBundleIdentifierTask                                  1 calls
     2,494 ms  MHManifestTask                                          4 calls
   122,349 ms  MHMultiBrandCopyTask                                    4 calls
     0,696 ms  MHReadPermissionsForManifestTask                        1 calls
     1,766 ms  MHReadSettingsForManifestTask                           1 calls
     0,652 ms  MHValueReplaceManifestTask                              1 calls
  4177,633 ms  MSBuild                                                 6 calls
     3,284 ms  ReadAdditionalResourcesFromAssemblyCache                1 calls
     2,263 ms  ReadImportedLibrariesCache                              1 calls
     2,494 ms  ReadLibraryProjectImportsCache                          1 calls
     0,247 ms  ReadLinesFromFile                                       1 calls
   111,545 ms  ReadResolvedSdksCache                                   1 calls
    29,908 ms  RemoveDirFixed                                          2 calls
    37,662 ms  RemoveDuplicates                                        1 calls
    26,440 ms  RemoveUnknownFiles                                      2 calls
   312,586 ms  ResolveAssemblies                                       1 calls
   230,364 ms  ResolveAssemblyReference                                2 calls
   436,439 ms  ResolveLibraryProjectImports                            1 calls
   162,844 ms  ResolveSdks                                             1 calls
    47,158 ms  Touch                                                  10 calls
     0,531 ms  ValidatePackageReferences                               1 calls
     0,580 ms  VectorDrawableCheckBuildToolsVersionTask                1 calls
     8,929 ms  WriteLinesToFile                                        4 calls

Build succeeded.
sdebruyn commented 7 years ago

@Redth The culprit seems to be GetAdditionalResourcesFromAssemblies. This has increased with about 3 minutes...

Redth commented 7 years ago

Can you try timings with 25.1.0-beta2 prerelease packages?

Redth commented 7 years ago

I do think this has been addressed with some of the Xamarin.Build.Download changes we've made. Please update Xamarin.Build.Download to version 0.4.3 or newer.