Xamarin iOS Extremely slow build time

xamarinuser1999xamarinuser1999 RUMember
edited April 2016 in Xamarin.iOS

Hi!
Please, help!
It drives me crazy :(
I am experiencing an extremely long build time (~3 minutes!). (the same for Xamarin Studio and VS2015)
The slowest is PackLibraryResources task, it takes almost 3,5 min!

12>Task Performance Summary:
12>        0 ms  ReadLinesFromFile                          2 calls
12>        0 ms  CallTarget                                 1 calls
12>        0 ms  Message                                    4 calls
12>        0 ms  ResolveNonMSBuildProjectOutput             1 calls
12>        0 ms  GetReferenceAssemblyPaths                  1 calls
12>        0 ms  Delete                                     5 calls
12>        0 ms  GenerateBuildSessionId                     1 calls
12>        0 ms  FindAppConfigFile                          1 calls
12>        0 ms  GetFrameworkPath                           1 calls
12>        0 ms  CopyFilesToBuildServer                     1 calls
12>        0 ms  MakeDir                                    2 calls
12>        0 ms  ResolveCodeAnalysisRuleSet                 1 calls
12>        0 ms  AssignTargetPath                           6 calls
12>        4 ms  CreateItem                                57 calls
12>        4 ms  ConvertToAbsolutePath                      1 calls
12>        8 ms  WriteLinesToFile                           6 calls
12>        8 ms  AssignCulture                              4 calls
12>        8 ms  WriteItemsToFile                           1 calls```****```
12>        8 ms  AssignProjectConfiguration                 1 calls
12>       16 ms  CreateCSharpManifestResourceName           1 calls
12>       20 ms  SayHello                                   1 calls
12>       20 ms  RemoveDuplicates                           3 calls
12>       23 ms  FindUnderPath                              7 calls
12>       47 ms  ResolveAssemblyReference                   1 calls
12>       86 ms  CollectBundleResources                     1 calls
12>      117 ms  MSBuild                                    8 calls
12>      125 ms  ConvertPdbToMdb                            1 calls
12>      132 ms  DetectSdkLocations                         1 calls
12>      168 ms  SayGoodbye                                 1 calls
12>      277 ms  Copy                                      27 calls
12>     1063 ms  Csc                                        1 calls
12>     1406 ms  RemoveDir                                  2 calls
12>     3057 ms  OptimizeImage                              1 calls
12>     4647 ms  IBTool                                     1 calls
12>    193349 ms  PackLibraryResources                       1 calls

Raw resource folder weights only about 6 mb; Resource folder (images, xibs) and .storyboard located not in Start-up project.

The build log (diagnostics) :

12>Task "PackLibraryResources" (TaskId:298)
12>  Task Parameter:SessionId=8f2a76e3814510a71da24747924f4e5b (TaskId:298)
12>  Task Parameter:Prefix=monotouch (TaskId:298)
12>  Task Parameter:
12>      BundleResourcesWithLogicalNames=
12>          obj\Debug\ibtool\MainStoryboard.storyboardc\6Ve-5l-Llh-view-VXD-0q-hjQ.nib
12>                  LogicalName=MainStoryboard.storyboardc/6Ve-5l-Llh-view-VXD-0q-hjQ.nib
12>                  Optimize=false

.......many similar lines

12>          Resources\dog.jpg
12>                  LogicalName=dog.jpg
12>                  Optimize=False
12>                  OriginalItemSpec=Resources\dog.jpg

.......many similar lines

12>          obj\Debug\optimized\welcome.png
12>                  LogicalName=welcome.png
12>                  Optimize='false'
12>                  ResourceTags= (TaskId:298)
12>  PackLibraryResources: 2016-04-14T12:57:12.2744375+06:00 - Started (TaskId:298)
12>  PackLibraryResources: 2016-04-14T12:57:12.2783444+06:00 - Initializing (TaskId:298)
12>  PackLibraryResources: 2016-04-14T12:57:12.2783444+06:00 - Initialized (TaskId:298)
12>  PackLibraryResources: 2016-04-14T12:57:12.2861570+06:00 - Serializing intputs (TaskId:298)
12>  PackLibraryResources: 2016-04-14T12:57:12.2900643+06:00 - Executing (TaskId:298)
12>  PackLibraryResources: 2016-04-14T12:57:15.0754143+06:00 - Logging messages (TaskId:298)
12>  PackLibraryResources Task (TaskId:298)
12>    BundleResourcesWithLogicalNames: (TaskId:298)
12>      obj/Debug/ibtool/MainStoryboard.storyboardc/6Ve-5l-Llh-view-VXD-0q-hjQ.nib (TaskId:298)

.......many similar lines

12>      obj/Debug/optimized/welcome.png (TaskId:298)
12>    Prefix: monotouch (TaskId:298)
12>  PackLibraryResources: 2016-04-14T12:57:15.0754143+06:00 - Deserializing outputs (TaskId:298)
12>  PackLibraryResources: 2016-04-14T12:57:15.0754143+06:00 - Creating output items (TaskId:298)
12>  PackLibraryResources: 2016-04-14T12:57:15.0754143+06:00 - Finished (TaskId:298)
12>  Executing SSH command 'ls /Users/admin/Library/Caches/Xamarin/mtbs/builds/MyProject/8f2a76e3814510a71da24747924f4e5b/obj/Debug/ibtool/MainStoryboard.storyboardc/6Ve-5l-Llh-view-VXD-0q-hjQ.nib'... (TaskId:298)

.......many similar lines
.......many similar lines

12>  Output Item(s): 
12>      EmbeddedResource=
12>          obj\Debug\ibtool\MainStoryboard.storyboardc\6Ve-5l-Llh-view-VXD-0q-hjQ.nib
12>                  LogicalName=__monotouch_content_MainStoryboard.storyboardc_f6Ve-5l-Llh-view-VXD-0q-hjQ.nib
12>                  Optimize=false

.......many similar lines
.......many similar lines
12>          obj\Debug\optimized\welcome.png
12>                  LogicalName=__monotouch_content_welcome.png
12>                  Optimize='false'
12>                  ResourceTags= (TaskId:298)
12>Done executing task "PackLibraryResources". (TaskId:298)
Tagged:

Answers

  • xamarinuser1999xamarinuser1999 RUMember
    edited April 2016

    I am wondering whether these lines are reason:
    Executing SSH command 'ls /Users/admin/Library/Caches/Xamarin/mtbs/builds/MyProject/8f2a76e3814510a71da24747924f4e5b/obj/Debug/ibtool/MainStoryboard.storyboardc/6Ve-5l-Llh-view-VXD-0q-hjQ.nib'... (TaskId:298)

    ?

  • RobertHammRobertHamm USMember ✭✭

    I too experience EXTREMELY slow build times ~6 minutes here.

    My project is fairly large but it really hinders development time taking this long to build.

  • JGoldbergerJGoldberger USMember, Forum Administrator, Xamarin Team, University Xamurai

    HI all,

    I created a bug report for this issue. However due to a customer's source code being added, it is a private internal bug report.

    Just wanted to let you all know we are now aware of this issue.

    Note that I do see that the same issue does not seem to occur when building with Xamarin Studio on the Mac.

  • Bartosz_CicheckiBartosz_Cichecki DKMember ✭✭

    I just wanted to add that I am seeing the same problem on Xamarin Studio for Mac.

  • MichaelMcCoolMichaelMcCool GBMember ✭✭

    Hi,
    Any news on this. I am also experiencing slow build times

  • ss88ss88 USMember

    i spend 70% of my development time waiting for the build.
    Sometimes I even watch a music video at same time.
    What a horrible experience.
    Vs 2015 here.

  • ChrisColeTechChrisColeTech USMember ✭✭✭

    @ss88 said:
    i spend 70% of my development time waiting for the build.
    Sometimes I even watch a music video at same time.
    What a horrible experience.
    Vs 2015 here.

    I mean...

    if I was being paid hourly I wouldn't complain LOL...too bad that isn't the case here

  • PaulBrennerPaulBrenner USUniversity ✭✭
    edited September 2016

    Same issue here, using VS, on the Xamarin beta channel.

    Edit:
    If its helpful here's the build log:

    2>Task Performance Summary:
    2> 0 ms FixedCreateCSharpManifestResourceName 1 calls
    2> 0 ms ResolveCodeAnalysisRuleSet 1 calls
    2> 0 ms GetFrameworkPath 1 calls
    2> 0 ms AssignCulture 1 calls
    2> 0 ms AssignProjectConfiguration 2 calls
    2> 1 ms ResolveNonMSBuildProjectOutput 1 calls
    2> 1 ms Message 6 calls
    2> 1 ms AssignTargetPath 12 calls
    2> 1 ms CallTarget 1 calls
    2> 1 ms FindAppConfigFile 1 calls
    2> 1 ms GetReferenceAssemblyPaths 1 calls
    2> 2 ms CollectMonotouchReferences 1 calls
    2> 2 ms ParseExtraMtouchArgs 1 calls
    2> 2 ms ReadLinesFromFile 2 calls
    2> 3 ms ConvertToAbsolutePath 1 calls
    2> 3 ms CopyFilesToBuildServer 1 calls
    2> 5 ms GenerateBuildSessionId 1 calls
    2> 7 ms ResolveUniversalTypeIdentifiers 1 calls
    2> 7 ms FindItemWithLogicalName 1 calls
    2> 10 ms CreateItem 60 calls
    2> 11 ms WriteLinesToFile 7 calls
    2> 14 ms WriteItemsToFile 3 calls
    2> 28 ms FindUnderPath 7 calls
    2> 38 ms CollectFrameworks 1 calls
    2> 39 ms DetectDebugNetworkConfiguration 1 calls
    2> 40 ms CreateDebugConfiguration 1 calls
    2> 41 ms RemoveDuplicates 3 calls
    2> 47 ms CreateDebugSettings 1 calls
    2> 64 ms CreateAssetPackManifest 1 calls
    2> 75 ms ValidateAppBundleTask 1 calls
    2> 85 ms MSBuild 5 calls
    2> 91 ms CollectBundleResources 2 calls
    2> 96 ms CreatePkgInfo 1 calls
    2> 99 ms CompileEntitlements 1 calls
    2> 107 ms CompileAppManifest 1 calls
    2> 135 ms XamlCTask 1 calls
    2> 136 ms GetNativeExecutableName 1 calls
    2> 146 ms CollectITunesArtwork 1 calls
    2> 190 ms DetectSdkLocations 1 calls
    2> 200 ms LocalUnzip 1 calls
    2> 209 ms DetectSigningIdentity 1 calls
    2> 245 ms ComputeBundleResourceOutputPaths 1 calls
    2> 344 ms ConvertPdbToMdb 1 calls
    2> 352 ms ACTool 1 calls
    2> 392 ms EmbedMobileProvision 1 calls
    2> 479 ms ResolveAssemblyReference 1 calls
    2> 657 ms SpotlightIndexer 1 calls
    2> 671 ms SmartCopy 1 calls
    2> 1037 ms MakeDir 5 calls
    2> 1110 ms Csc 1 calls
    2> 1575 ms Delete 14 calls
    2> 1720 ms Ditto 1 calls
    2> 1737 ms SayGoodbye 1 calls
    2> 1838 ms DSymUtil 1 calls
    2> 2002 ms CollectITunesSourceFiles 1 calls
    2> 2230 ms SayHello 1 calls
    2> 3110 ms CodesignVerify 1 calls
    2> 3205 ms Copy 11 calls
    2> 3544 ms UnpackLibraryResources 1 calls
    2> 4569 ms OptimizeImage 1 calls
    2> 5522 ms RemoveDir 9 calls
    2> 6775 ms Zip 2 calls
    2> 14846 ms IBTool 1 calls
    2> 17043 ms CompileITunesMetadata 1 calls
    2> 27283 ms Codesign 48 calls
    2> 38248 ms CopyFileFromMac 2 calls
    2> 71346 ms MTouch 1 calls

    48 calls for codesign doesn't seem normal, right?

  • JuanPabloSillerJuanPabloSiller USMember ✭✭

    Does someone know if this should be resolved? Taking about 30 min to compile and I'm researching a bug which requires constant change of the code.

  • PeterMcNultyPeterMcNulty USMember

    Also having the same problem! Making developing with Xamarin a massive pain

  • ChrisColeTechChrisColeTech USMember ✭✭✭

    oh, so that gives me hope...
    it'll only take 30 mins to build.

  • MesutPolat.2316MesutPolat.2316 USMember ✭✭
    edited January 2017

    I can offer you a few suggestions to reduce compilation time.
    I think the cause of the long compilation time can be the cache files.
    1. I clean my Mac with 'CleanMyMac'. (I do the operation every 2 weeks.)
    2. I open the xcode program on Mac. (not Xamarin Studio. just xcode)
    3. I open the project with VS2015 in Windows environment
    4. I delete the bin and obj files in the project file
    5. Rebuilding the project
    6. I clean the project.
    And I'm running the project. The compilation ends in 5-10 seconds.

    I hope it helps.

  • per0per0 HRMember

    Also having this problem. Build takes about 10 minutes, really killing productivity.

  • Nsr.2211Nsr.2211 USMember ✭✭

    Conclusion: Xamarin sucks

Sign In or Register to comment.