Closed thomasvdb closed 7 years ago
Do you have the same diagnostic timing output from the previous version of support libraries?
@Redth I've updated the original issue with timings from a previous version
Just noting that it seems GetAdditionalResourcesFromAssemblies
is the main culprit in the additional time increase.
@Redth What does this step exactly do? How can we significantly decrease this?
Likely one of two possible issues.
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.
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).
@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.
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.
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...
It shouldn't happen every build if the cache was downloaded and extracted properly....
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.
It should be downloading them from Google's servers https://dl-ssl.google.com/android/repository/...
Clearing the cache didn't help. This is what I tried:
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.
@Redth The culprit seems to be GetAdditionalResourcesFromAssemblies. This has increased with about 3 minutes...
Can you try timings with 25.1.0-beta2 prerelease packages?
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.
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):
This is a screenshot of our buildserver where you can see quite an increase of the build time!
Diagnostics build output previous build (with support packages v23 and Android target framework 6.0)
Both were done with a Clean and Rebuild.