Slow app build - Xamarin for Visual Studio -
the build/deploy of xamarin.android app painfully slow these days. cannot remember being slow before.
i have enabled:
- use shared runtime
- fast deployment
enabling or disabling these settings doesn't make difference. in both scenarios takes 2 minutes , 20 seconds (up on 3 minutes!) build/deploy app. using real device or visual studio emulator android doesn’t make difference well.
why extremely slow? not using right settings?
update 2
yesterday (november 14th) updated xamarin.vs 4.2.1.58. no improvements in build duration.
we using teamcity build release versions of our app, teamcity statistics show i'm talking about.
in graph below, selected last quarter date range. see major increase in build duration. now, don't mind waiting 3 minutes release build, it's not acceptable when debugging.
update 3
jon, help.
in meantime, have done research myself in build logs , found duration per build task well. found somehow getadditionalresourcesfromassemblies
takes lot of time.
the amount of resources have in app didn't change dramatically, got me thinking: assembly i'm using..
i did checkout of revision 1029 (which last revision took minute build) , tried debug in updated environment. still built within 1m30s...
so:
- it's not vs xamarin update (else revision 1029 build slow well)
- it's not fast deployment, duration increased in build process
so changed between revision 1029 , 1030 of app?
- updated xamarin visual studio 4.2.0.719
- installed android 7.0 sdk platform in android sdk manager
- changed
compile using android version
android 7.0 in project properties - updated xamarin.android support libraries 23.4.0.1 24.2.1
change 4 why updated in first place, wanted use bottomsheet
, improved in version 24. support library nugets targeting android 7.0, had 1-3 in order able update support libraries.
could have changed in support library bindings caused this? checked internet other devs having issue, , found this in xamarin forum. setting androidexplicitcrunch
build property true
seems fix there, when tried that, got build error.
anyway, that's i've tried in meantime. now, requested, here diagnostic build log:
1>project performance summary: 1> 3 ms c:\development\apps\fieldservice-trunk\overallfield.xamarinandroid\overall.app.shared\overall.app.shared.csproj 3 calls 1> 1 ms gettargetpath 1 calls 1> 0 ms getnativemanifest 1 calls 1> 2 ms getcopytooutputdirectoryitems 1 calls 1> 4 ms c:\development\apps\fieldservice-trunk\overallfield.xamarinandroid\overallfield.xamarinandroid.datalayer\overallfield.xamarinandroid.datalayer.csproj 3 calls 1> 1 ms gettargetpath 1 calls 1> 0 ms getnativemanifest 1 calls 1> 3 ms getcopytooutputdirectoryitems 1 calls 1> 40103 ms c:\development\apps\fieldservice-trunk\overallfield.xamarinandroid\overallfield.xamarinandroid.serviceclient\overallfield.xamarinandroid.serviceclient.csproj 1 calls 1> 1>target performance summary: 1> 0 ms compile 1 calls 1> 0 ms resolvereferences 1 calls 1> 0 ms bclbuildgettargetpath 1 calls 1> 0 ms ensurenugetpackagebuildimports 1 calls 1> 0 ms afterresgen 1 calls 1> 0 ms resolvecodeanalysisruleset 1 calls 1> 0 ms _createpropertiescache 1 calls 1> 0 ms _settargetframeworkmonikerattribute 1 calls 1> 0 ms beforeresgen 1 calls 1> 0 ms modifyunittestplatformversion 1 calls 1> 0 ms createcustommanifestresourcenames 1 calls 1> 0 ms bclbuildaddprojectreferenceproperties 1 calls 1> 0 ms _resolvemonoandroidframework 1 calls 1> 0 ms updateandroidresources 1 calls 1> 0 ms corebuild 1 calls 1> 0 ms expressionbuildextension 1 calls 1> 0 ms _checktargetframework 1 calls 1> 0 ms _copyappconfigfile 1 calls 1> 0 ms build 1 calls 1> 0 ms deletebuildinfofile 1 calls 1> 0 ms cleanxsdcodegen 1 calls 1> 0 ms _setupinstantrun 1 calls 1> 0 ms getframeworkpaths 1 calls 1> 0 ms deletebuildinforesource 1 calls 1> 0 ms _addandroiddefines 1 calls 1> 0 ms buildonlysettings 1 calls 1> 0 ms computeintermediatesatelliteassemblies 1 calls 1> 0 ms validationextension 1 calls 1> 0 ms aftercompile 1 calls 1> 0 ms _checkinstantruncondition 1 calls 1> 0 ms _generatesatelliteassemblyinputs 1 calls 1> 0 ms _setupapplicationjavaclass 1 calls 1> 0 ms _setupdesigntimebuildforintellisense 1 calls 1> 0 ms setwin32manifestproperties 1 calls 1> 0 ms createsatelliteassemblies 1 calls 1> 0 ms _copysourceitemstooutputdirectory 1 calls 1> 0 ms getinstalledsdklocations 1 calls 1> 0 ms _addandroidenvironmenttocompile 1 calls 1> 0 ms _checkforcontent 1 calls 1> 0 ms _separateappextensionreferences 1 calls 1> 0 ms afterresolvereferences 1 calls 1> 0 ms beforeresolvereferences 1 calls 1> 0 ms prepareresources 1 calls 1> 0 ms resolvesdkreferences 1 calls 1> 0 ms _checkfordeletedresourcefile 1 calls 1> 0 ms beforecompile 1 calls 1> 0 ms updateandroidassets 1 calls 1> 0 ms designtimexamlmarkupcompilation 1 calls 1> 0 ms _addmultidexdependencyjars 1 calls 1> 0 ms prepareforrun 1 calls 1> 0 ms resgen 1 calls 1> 0 ms _generateandroidassetsdir 1 calls 1> 0 ms afterbuild 1 calls 1> 0 ms bclbuildsetrunningfullbuild 1 calls 1> 0 ms getnativemanifest 2 calls 1> 0 ms expandsdkreferences 1 calls 1> 0 ms generatetargetframeworkmonikerattribute 1 calls 1> 0 ms _generateandroidresourcedir 1 calls 1> 0 ms createmanifestresourcenames 1 calls 1> 0 ms beforebuild 1 calls 1> 0 ms _generatecompileinputs 1 calls 1> 0 ms _setupdesigntimebuildforbuild 1 calls 1> 0 ms prepareresourcenames 1 calls 1> 0 ms _addnativelibraryarchivetocompile 1 calls 1> 1 ms getcopytooutputdirectoryxamlappdefs 3 calls 1> 1 ms _generatejavadesignerforcomponent 1 calls 1> 1 ms _collectmonoandroidoutputs 1 calls 1> 1 ms _setembeddedwin32manifestproperties 1 calls 1> 1 ms coreresgen 1 calls 1> 1 ms _validatelinkmode 1 calls 1> 1 ms _getlibraryimports 1 calls 1> 1 ms _checkforcompileoutputs 1 calls 1> 1 ms _readpropertiescache 1 calls 1> 1 ms gettargetpath 2 calls 1> 1 ms _computeandroidresourcepaths 1 calls 1> 1 ms setbuildinfodefaults 1 calls 1> 1 ms splitresourcesbyculture 1 calls 1> 1 ms _splitprojectreferencesbyfileexistence 3 calls 1> 1 ms generatecompiledexpressionstempfile 1 calls 1> 1 ms bclbuilddeterminereferencestoredirect 1 calls 1> 1 ms _getreferenceassemblypaths 1 calls 1> 1 ms prexsdcodegen 1 calls 1> 2 ms _registermdbfileswithfilewrites 1 calls 1> 2 ms prepareforbuild 1 calls 1> 2 ms _buildsdkcache 1 calls 1> 2 ms _calculateadditionalresourcecachedirectories 1 calls 1> 2 ms assignprojectconfiguration 1 calls 1> 2 ms _createadditionalresourcecache 1 calls 1> 2 ms getreferenceassemblypaths 1 calls 1> 3 ms _getadditionalresourcesfromassemblies 1 calls 1> 3 ms _checkduplicatejavalibraries 1 calls 1> 3 ms _collectadditionalresourcefiles 1 calls 1> 3 ms _extractlibraryprojectimports 1 calls 1> 3 ms _computeandroidassetspaths 1 calls 1> 3 ms assigntargetpaths 3 calls 1> 3 ms copyfilestooutputdirectory 1 calls 1> 4 ms _validateresourcecache 1 calls 1> 4 ms _validateandroidpackageproperties 1 calls 1> 5 ms incrementalclean 1 calls 1> 7 ms _resolvemonoandroidsdks 1 calls 1> 9 ms _checkforinvalidconfigurationandplatform 3 calls 1> 10 ms getcopytooutputdirectoryitems 3 calls 1> 11 ms _copyfilesmarkedcopylocal 1 calls 1> 11 ms _cleangetcurrentandpriorfilewrites 1 calls 1> 12 ms _addlibraryprojectsembeddedresourcetoproject 1 calls 1> 18 ms implicitlyexpanddesigntimefacades 1 calls 1> 29 ms _buildlibraryimportscache 1 calls 1> 41 ms resolveprojectreferences 1 calls 1> 70 ms _setlatesttargetframeworkversion 1 calls 1> 114 ms _resolvelibraryprojectimports 1 calls 1> 138 ms resolveassemblyreferences 1 calls 1> 207 ms _updateandroidresgen 1 calls 1> 356 ms _getprimarycpuabi 1 calls 1> 803 ms corecompile 1 calls 1> 38202 ms _buildadditionalresourcescache 1 calls 1> 1>task performance summary: 1> 0 ms createcsharpmanifestresourcename 1 calls 1> 0 ms delete 2 calls 1> 0 ms findappconfigfile 1 calls 1> 0 ms resolvecodeanalysisruleset 1 calls 1> 0 ms calltarget 1 calls 1> 0 ms resolvenonmsbuildprojectoutput 1 calls 1> 0 ms assignculture 1 calls 1> 1 ms getframeworkpath 1 calls 1> 1 ms getandroidpackagename 1 calls 1> 1 ms assignprojectconfiguration 1 calls 1> 1 ms readimportedlibrariescache 1 calls 1> 1 ms readlinesfromfile 2 calls 1> 1 ms getappsettingsdirectory 1 calls 1> 1 ms assigntargetpath 18 calls 1> 1 ms createtemporarydirectory 1 calls 1> 1 ms getreferenceassemblypaths 2 calls 1> 2 ms message 20 calls 1> 2 ms calculateadditionalresourcecachedirectories 1 calls 1> 2 ms getjavaplatformjar 1 calls 1> 2 ms makedir 2 calls 1> 2 ms writelinestofile 1 calls 1> 2 ms converttoabsolutepath 1 calls 1> 3 ms removeduplicates 2 calls 1> 3 ms copyifchanged 1 calls 1> 3 ms checkduplicatejavalibraries 1 calls 1> 3 ms androidcomputerespaths 2 calls 1> 3 ms readlibraryprojectimportscache 1 calls 1> 3 ms createproperty 41 calls 1> 4 ms copygeneratedjavaresourceclasses 1 calls 1> 4 ms getextrapackages 1 calls 1> 4 ms getandroiddefineconstants 1 calls 1> 4 ms createandroidresourcestamp 1 calls 1> 5 ms findunderpath 5 calls 1> 5 ms readadditionalresourcesfromassemblycache 2 calls 1> 5 ms createresgenmanifest 1 calls 1> 6 ms createitem 23 calls 1> 6 ms removedirfixed 1 calls 1> 12 ms createmanagedlibraryresourcearchive 1 calls 1> 14 ms copy 3 calls 1> 16 ms convertresourcescases 1 calls 1> 21 ms generateresourcedesigner 1 calls 1> 28 ms getimportedlibraries 1 calls 1> 49 ms msbuild 3 calls 1> 49 ms readresolvedsdkscache 1 calls 1> 114 ms resolvelibraryprojectimports 1 calls 1> 137 ms resolveassemblyreference 1 calls 1> 142 ms aapt 1 calls 1> 347 ms getprimarycpuabi 1 calls 1> 792 ms csc 1 calls 1> 38201 ms getadditionalresourcesfromassemblies 1 calls 1> 1>build succeeded. 1> 1>time elapsed 00:00:40.09
there second summary (the log has 2 of these summaries somehow), can't include in question, because exceed body character limit. smaller version of second summary:
2>project performance summary: 2> 6 ms c:\development\apps\fieldservice-trunk\overallfield.xamarinandroid\overall.app.shared\overall.app.shared.csproj 5 calls 2> 0 ms gettargetpath 1 calls 2> 0 ms getnativemanifest 1 calls 2> 1 ms getcopytooutputdirectoryitems 1 calls 2> 5 ms getbuiltprojectoutputrecursive 2 calls 2> 9 ms c:\development\apps\fieldservice-trunk\overallfield.xamarinandroid\overallfield.xamarinandroid.barcodescanner\overallfield.xamarinandroid.barcodescanner.csproj 4 calls 2> 0 ms gettargetpath 1 calls 2> 2 ms getnativemanifest 1 calls 2> 3 ms getcopytooutputdirectoryitems 1 calls 2> 4 ms getbuiltprojectoutputrecursive 1 calls 2> 17 ms c:\development\apps\fieldservice-trunk\overallfield.xamarinandroid\overallfield.xamarinandroid.datalayer\overallfield.xamarinandroid.datalayer.csproj 5 calls 2> 9 ms gettargetpath 1 calls 2> 1 ms getnativemanifest 1 calls 2> 2 ms getcopytooutputdirectoryitems 1 calls 2> 5 ms getbuiltprojectoutputrecursive 2 calls 2> 46 ms c:\development\apps\fieldservice-trunk\overallfield.xamarinandroid\overallfield.xamarinandroid.serviceclient\overallfield.xamarinandroid.serviceclient.csproj 4 calls 2> 21 ms gettargetpath 1 calls 2> 0 ms getnativemanifest 1 calls 2> 2 ms getcopytooutputdirectoryitems 1 calls 2> 23 ms getbuiltprojectoutputrecursive 1 calls 2> 87736 ms c:\development\apps\fieldservice-trunk\overallfield.xamarinandroid\overallfield.android\overallfield.xamarinandroid.csproj 1 calls
second target performance summary: (removed <1000 ms reduce chars)
2> 1955 ms _generatejavastubs 1 calls 2> 3083 ms _createbaseapk 1 calls 2> 3467 ms _updateandroidresgen 1 calls 2> 8944 ms _compiletodalvikwithdx 1 calls 2> 66321 ms _buildadditionalresourcescache 1 calls
second task performance summary: (again, removed <1000 ms reduce chars)
2> 1245 ms generatejavastubs 1 calls 2> 2334 ms convertresourcescases 3 calls 2> 4637 ms aapt 2 calls 2> 8941 ms compiletodalvik 1 calls 2> 66320 ms getadditionalresourcesfromassemblies 1 calls 2> 2>build succeeded. 2> 2>time elapsed 00:01:27.73
full diagnostic build log here
update 4
full diagnostic build log android support version 23 here
there significant difference between build times. support version 24:
1>project performance summary: 1> 40103 ms c:\development\apps\trunk\app.droid\app.droid.serviceclient\app.droid.serviceclient.csproj 1 calls ... 2>project performance summary: 2> 87736 ms c:\development\apps\trunk\app.droid\app.droid\app.droid.csproj 1 calls
support version 23:
1>project performance summary: 1> 962 ms c:\development\apps\trunk-r1029\app.droid\app.droid.serviceclient\app.droid.serviceclient.csproj 1 calls 2>project performance summary: 2> 18214 ms c:\development\apps\trunk-r1029\app.droid\app.droid\app.droid.csproj 1 calls
both built target android 7.0 , same xamarin version, difference android support library version. isn't huge increase?
thanks in advance!
although "tough" question answer build times can dependent on many different factors, can walk through ways determine what in build causing delay. in cases it's typically because of non-optimized resources
. can resources raw images/audio/video should optimized mobile.
as experimental functionality mentioned, can view release notes here:
note: experimental, not guarantee stable enough use in production.
as build times, need know bottleneck within project. this, need enable diagnostic build output
in build-agent's command. pretty simple msbuild
via:
/v:diag
or /verbosity:diagnostic
(or whatever combination wanted)
and
/clp:performancesummary
- tell use performance timings of each task
https://msdn.microsoft.com/en-us/library/ms164311.aspx
ex: building file->new android project:
1>project performance summary: 1> 4087 ms c:\users\dougl\documents\visual studio 2015\projects\app26\app26\app26.csproj 1 calls 1> 4087 ms rebuild 1 calls 1> 1>target performance summary: 1> 0 ms getcopytooutputdirectoryxamlappdefs 1 calls 1> 0 ms beforerebuild 1 calls 1> 0 ms prepareresources 1 calls 1> 0 ms _definebuildtargetabis 1 calls 1> 0 ms updateandroidassets 1 calls 1> 0 ms afterbuild 1 calls 1> 0 ms aftercompile 1 calls 1> 0 ms beforecompile 1 calls 1> 0 ms expressionbuildextension 1 calls 1> 0 ms _generatecompileinputs 1 calls 1> 0 ms resolvecodeanalysisruleset 1 calls 1> 0 ms _linkassemblies 1 calls 1> 0 ms gettargetpath 1 calls 1> 0 ms build 1 calls 1> 0 ms generatecompiledexpressionstempfile 1 calls 1> 0 ms _copyconfigfiles 1 calls 1> 0 ms compile 1 calls 1> 0 ms rebuild 1 calls 1> 0 ms modifyunittestplatformversion 1 calls 1> 0 ms _registermdbfileswithfilewrites 1 calls 1> 0 ms _checkforcompileoutputs 1 calls 1> 0 ms _setupdesigntimebuildforintellisense 1 calls 1> 0 ms _settargetframeworkmonikerattribute 1 calls 1> 0 ms _generateandroidassetsdir 1 calls 1> 0 ms _addmultidexdependencyjars 1 calls 1> 0 ms afterresolvereferences 1 calls 1> 0 ms updateandroidresources 1 calls 1> 0 ms _checkinstantruncondition 1 calls 1> 0 ms cleanpublishfolder 1 calls 1> 0 ms _checktargetframework 1 calls 1> 0 ms _collectmonoandroidoutputs 1 calls 1> 0 ms _copysourceitemstooutputdirectory 1 calls 1> 0 ms compilerdlfiles 1 calls 1> 0 ms _createadditionalresourcecache 4 calls 1> 0 ms designtimexamlmarkupcompilation 1 calls 1> 0 ms afterrebuild 1 calls 1> 0 ms _separateappextensionreferences 1 calls 1> 0 ms expandsdkreferences 1 calls 1> 0 ms _readpropertiescache 1 calls 1> 0 ms afterresgen 1 calls 1> 0 ms cleanreferencedprojects 1 calls 1> 0 ms _collectpclpdbfiles 1 calls 1> 0 ms clean 1 calls 1> 0 ms setwin32manifestproperties 1 calls 1> 0 ms resolvesdkreferences 1 calls 1> 0 ms createsatelliteassemblies 1 calls 1> 0 ms deletebuildinforesource 1 calls 1> 0 ms _resolvemonoandroidframework 1 calls 1> 0 ms prepareresourcenames 1 calls 1> 0 ms _setupinstantrun 1 calls 1> 0 ms _setupdesigntimebuildforbuild 1 calls 1> 0 ms corebuild 1 calls 1> 0 ms _checkfordeletedresourcefile 1 calls 1> 0 ms getframeworkpaths 1 calls 1> 0 ms _validatelinkmode 1 calls 1> 0 ms deletebuildinfofile 1 calls 1> 0 ms _collectpclmdbfiles 1 calls 1> 0 ms _compiledex 1 calls 1> 0 ms getinstalledsdklocations 1 calls 1> 0 ms beforeclean 1 calls 1> 0 ms buildonlysettings 1 calls 1> 0 ms _validateresourcecache 1 calls 1> 0 ms beforeresolvereferences 1 calls 1> 0 ms _checkforcontent 1 calls 1> 0 ms beforeresgen 1 calls 1> 0 ms preparerdlfiles 1 calls 1> 0 ms afterclean 1 calls 1> 0 ms _setupapplicationjavaclass 1 calls 1> 0 ms validationextension 1 calls 1> 0 ms _includeinstancerunreference 1 calls 1> 0 ms resolvereferences 1 calls 1> 0 ms createcustommanifestresourcenames 1 calls 1> 0 ms resgen 1 calls 1> 0 ms beforebuild 1 calls 1> 1 ms _splitprojectreferencesbyfileexistence 1 calls 1> 1 ms _generatesatelliteassemblyinputs 1 calls 1> 1 ms prepareforrun 1 calls 1> 1 ms cleanxsdcodegen 1 calls 1> 1 ms generatetargetframeworkmonikerattribute 1 calls 1> 1 ms resolveprojectreferences 1 calls 1> 1 ms assigntargetpaths 1 calls 1> 1 ms _createintermediateassembliesdir 1 calls 1> 1 ms getcopytooutputdirectoryitems 1 calls 1> 1 ms prexsdcodegen 1 calls 1> 1 ms _getreferenceassemblypaths 1 calls 1> 1 ms coreresgen 1 calls 1> 1 ms _cleangenerateddeploymentfiles 1 calls 1> 1 ms setbuildinfodefaults 1 calls 1> 1 ms assignprojectconfiguration 1 calls 1> 1 ms _createpackageworkspace 1 calls 1> 1 ms _getmonoplatformjarpath 1 calls 1> 1 ms prepareforbuild 1 calls 1> 1 ms _calculateadditionalresourcecachedirectories 1 calls 1> 1 ms _computeandroidresourcepaths 1 calls 1> 1 ms _setembeddedwin32manifestproperties 1 calls 1> 1 ms _getaddonplatformlibraries 1 calls 1> 1 ms _getlibraryimports 1 calls 1> 1 ms splitresourcesbyculture 1 calls 1> 1 ms getreferenceassemblypaths 1 calls 1> 1 ms _checkprojectitems 1 calls 1> 1 ms _adjustjavacversionarguments 1 calls 1> 1 ms _cleangenerateddebuggingfiles 1 calls 1> 2 ms _prepareassemblies 1 calls 1> 2 ms _findjavastubfiles 1 calls 1> 2 ms _extractlibraryprojectimports 1 calls 1> 2 ms _stripembeddedlibraries 1 calls 1> 2 ms _cleangetcurrentandpriorfilewrites 1 calls 1> 2 ms _getadditionalresourcesfromassemblies 1 calls 1> 2 ms _findcompiledjavafiles 1 calls 1> 2 ms _checkduplicatejavalibraries 1 calls 1> 2 ms _addlibraryprojectsembeddedresourcetoproject 1 calls 1> 3 ms _computeandroidassetspaths 1 calls 1> 3 ms copyfilestooutputdirectory 1 calls 1> 3 ms coreclean 1 calls 1> 3 ms _collectpdbfiles 1 calls 1> 3 ms getbuiltprojectoutputrecursive 1 calls 1> 3 ms _collectconfigfiles 1 calls 1> 3 ms _validateandroidpackageproperties 1 calls 1> 3 ms _writeresolvedassemblies 1 calls 1> 4 ms _createpropertiescache 1 calls 1> 4 ms _resolvemonoandroidsdks 1 calls 1> 4 ms _adddebugstaticresources 1 calls 1> 4 ms _buildlibraryimportscache 1 calls 1> 4 ms _collectmdbfiles 1 calls 1> 5 ms _checkforinvalidconfigurationandplatform 1 calls 1> 7 ms _resolvesatellitepaths 1 calls 1> 7 ms _generatepackagemanagerjava 1 calls 1> 8 ms _determinejavalibrariestocompile 1 calls 1> 9 ms incrementalclean 1 calls 1> 10 ms _addstaticresources 1 calls 1> 11 ms _cleanmonoandroidintermediatedir 1 calls 1> 11 ms _generateandroidresourcedir 1 calls 1> 12 ms _cleanmsymarchive 1 calls 1> 18 ms _setlatesttargetframeworkversion 1 calls 1> 20 ms resolveassemblyreferences 1 calls 1> 27 ms implicitlyexpanddesigntimefacades 1 calls 1> 30 ms _buildsdkcache 1 calls 1> 35 ms _convertpdbfiles 1 calls 1> 45 ms _checktargetframeworks 1 calls 1> 46 ms _resolvelibraryprojectimports 1 calls 1> 52 ms _createbaseapk 1 calls 1> 66 ms _buildadditionalresourcescache 1 calls 1> 72 ms _copymdbfiles 1 calls 1> 78 ms _resolveassemblies 1 calls 1> 115 ms _updateandroidresgen 1 calls 1> 167 ms _generatejavastubs 1 calls 1> 189 ms _getprimarycpuabi 1 calls 1> 453 ms _copyintermediateassemblies 1 calls 1> 515 ms _linkassembliesnoshrink 1 calls 1> 657 ms _compiletodalvikwithdx 1 calls 1> 664 ms _compilejava 1 calls 1> 677 ms corecompile 1 calls 1> 1>task performance summary: 1> 0 ms calltarget 1 calls 1> 0 ms msbuild 1 calls 1> 0 ms resolvecodeanalysisruleset 1 calls 1> 0 ms readlinesfromfile 2 calls 1> 0 ms getframeworkpath 1 calls 1> 0 ms findappconfigfile 1 calls 1> 0 ms assignculture 1 calls 1> 1 ms getappsettingsdirectory 1 calls 1> 1 ms converttoabsolutepath 1 calls 1> 1 ms removeduplicates 3 calls 1> 1 ms assigntargetpath 6 calls 1> 1 ms collectlibraryassets 1 calls 1> 1 ms assignprojectconfiguration 1 calls 1> 1 ms getmonoplatformjar 1 calls 1> 1 ms calculateadditionalresourcecachedirectories 1 calls 1> 1 ms createtemporarydirectory 2 calls 1> 1 ms getandroiddefineconstants 1 calls 1> 1 ms getaddonplatformlibraries 1 calls 1> 1 ms readimportedlibrariescache 1 calls 1> 1 ms readadditionalresourcesfromassemblycache 1 calls 1> 1 ms checkprojectitems 1 calls 1> 1 ms getreferenceassemblypaths 2 calls 1> 1 ms adjustjavacversionarguments 1 calls 1> 2 ms findunderpath 7 calls 1> 2 ms message 17 calls 1> 2 ms readlibraryprojectimportscache 1 calls 1> 2 ms makedir 6 calls 1> 2 ms createandroidresourcestamp 1 calls 1> 2 ms createproperty 42 calls 1> 2 ms copyifchanged 1 calls 1> 2 ms getandroidpackagename 2 calls 1> 2 ms getjavaplatformjar 1 calls 1> 2 ms getextrapackages 2 calls 1> 2 ms checkduplicatejavalibraries 1 calls 1> 2 ms createmanagedlibraryresourcearchive 1 calls 1> 3 ms removeunknownfiles 1 calls 1> 3 ms androidcomputerespaths 2 calls 1> 3 ms createresgenmanifest 1 calls 1> 4 ms getimportedlibraries 1 calls 1> 4 ms getfilesthatexist 3 calls 1> 6 ms touch 7 calls 1> 6 ms copygeneratedjavaresourceclasses 2 calls 1> 7 ms createitem 20 calls 1> 7 ms generatepackagemanagerjava 1 calls 1> 7 ms determinejavalibrariestocompile 1 calls 1> 8 ms delete 28 calls 1> 10 ms copyresource 4 calls 1> 11 ms removedirfixed 5 calls 1> 12 ms writelinestofile 5 calls 1> 17 ms readresolvedsdkscache 1 calls 1> 27 ms resolveassemblyreference 2 calls 1> 29 ms generateresourcedesigner 1 calls 1> 29 ms resolvesdks 1 calls 1> 29 ms convertresourcescases 3 calls 1> 35 ms convertdebuggingfiles 1 calls 1> 45 ms checktargetframeworks 1 calls 1> 45 ms resolvelibraryprojectimports 1 calls 1> 52 ms copymdbfiles 1 calls 1> 65 ms getadditionalresourcesfromassemblies 1 calls 1> 77 ms resolveassemblies 1 calls 1> 92 ms aapt 2 calls 1> 161 ms generatejavastubs 1 calls 1> 186 ms getprimarycpuabi 1 calls 1> 479 ms copy 7 calls 1> 513 ms linkassemblies 1 calls 1> 655 ms compiletodalvik 1 calls 1> 660 ms csc 1 calls 1> 664 ms javac 1 calls 1> 1>build succeeded. 1> 1>time elapsed 00:00:04.08
notice can tell how long build took: 4 seconds. doesn't answer case, proper log this, can investigate target
or task
, figure out project bottlenecking on. guess aapt
, that's because android studio hang here tooling inside android sdk
, responsible packaging android assets.
edit:
it looks build took ~2 minutes build 2 projects. 1 being in c:\development\apps\trunk\app.droid\app.droid.serviceclient\app.droid.serviceclient.csproj
, other in c:\development\apps\trunk\app.droid\app.droid\app.droid.csproj
(40 / 87 seconds respectively). seems quite normal project many third party dependencies android support / google play. can search string task "getadditionalresourcesfromassemblies
show 6 places defined. there 2 tasks being invoked here due 2 android projects.
it might worth comparison of android studio project many external dependencies , compare time. know have quite bit of on-going work regards getadditionalresourcesfromassemblies
task. work won't available until cycle 9-10. work apart of pull request:
https://github.com/xamarin/xamarin-android/pull/296
(you can tell it's brand new due commit time).
as can tell task, there following improvements:
the current task downloads data google. regardless of whether files exist in android sdk directory already. commit changes getadditionalresourcesfromassemblies task in "extras" folder in android sdk required .aar file. mean if user has date sdk, there no need download files internet.
there's pr - https://github.com/xamarin/xamarin-android/pull/292 (thanks @mikhail)
which addresses reusing computed hash can lower build times.
tldr; getadditionalresourcesfromassemblies
needs bit more work build times shorter. in works.
edit 2:
this resolved in support libraries include dependency https://www.nuget.org/packages/xamarin.build.download/
Comments
Post a Comment