Latest version: build is extremely slow and it is hurting productivity!

Hi all,

After updating to latest stable build on both my Mac and Visual Studio machine, the time it takes to build and debug is extremely long. Before it took less than 30 seconds to copy files to spin up the simulator. Now every time I try to debug the application, it takes....4 to 5 minutes!!! It is very frustrating.

I have 3 Portable projects, and one Xamarin.iOS project in one solution.

In the Mac Server Log, there are a bunch of these which run like...forever!

[25-Sep-2014 09:31:43] Command [CopyFile: CommmandUrl=CopyFile] finished (13)
[25-Sep-2014 09:31:43] Handling with command: [CopyFile: CommmandUrl=CopyFile] (158)
[25-Sep-2014 09:31:44] Request handled in 931.818ms
[25-Sep-2014 09:31:44] Attempting to acquire command execution lock, timeout set to 00:10:00
[25-Sep-2014 09:31:44] Command [CopyFile: CommmandUrl=CopyFile] finished (158)
[25-Sep-2014 09:31:44] Handling with command: [CopyFile: CommmandUrl=CopyFile] (11)
[25-Sep-2014 09:31:44] Attempting to acquire command execution lock, timeout set to 00:10:00
[25-Sep-2014 09:31:44] Request handled in 563.345ms
[25-Sep-2014 09:31:44] Request handled in 2.057ms
[25-Sep-2014 09:31:44] Command [CopyFile: CommmandUrl=CopyFile] finished (11)
[25-Sep-2014 09:31:44] Handling with command: [CopyFile: CommmandUrl=CopyFile] (14)
[25-Sep-2014 09:31:44] Attempting to acquire command execution lock, timeout set to 00:10:00
[25-Sep-2014 09:31:45] Request handled in 553.853ms
[25-Sep-2014 09:31:45] Command [CopyFile: CommmandUrl=CopyFile] finished (14)
[25-Sep-2014 09:31:45] Handling with command: [CopyFile: CommmandUrl=CopyFile] (13)
[25-Sep-2014 09:31:45] Request handled in 468.738ms
[25-Sep-2014 09:31:45] Attempting to acquire command execution lock, timeout set to 00:10:00
[25-Sep-2014 09:31:45] Command [CopyFile: CommmandUrl=CopyFile] finished (13)

Is anyone experiencing the same issue?

Cheers

«1

Posts

  • FrankBuckleyFrankBuckley GBUniversity ✭✭

    Are you building for device or simulator? See thread and bug for discussion.

  • tomnuentomnuen VNMember ✭✭

    Hi Frank,

    I'm building for simulator.

    Even when there is no change made to the code, everytime I start debugging it just keeps sending build to the server to compile. Disconnecting from server does make the compilation a lot faster but as soon as I connect to the server, it's slow again.

  • I have the exact same problem. Every build is taking ages. I do build to a device and 4-5 minut for each build is killing productivity.

    Any solutions!? Quick

  • OZGURAKSUOZGURAKSU TRMember
    edited September 2014

    Yes. Not only that, it keeps disconnecting from build host. If you build when disconnected, connect after that, and execute, it will not deploy but execute old copy! Tremendous amount of bugs with Visual Studio and Build Host. There were problems with disconnection and debugging and build speed before. Unfortunately, it only got worse with latest stable version.

    My recommendation for now is to make sure you have your build host connected (device drop down menu should be full), before executing any build or debug commands. If the connection is there, it does a smarter build (not rebuild) and takes less time in my experience.

  • NoName2NoName2 USMember

    Building is also slow like a turtle here. It's not fun developing for iOS with Xamarin, rather an imposition.
    Sometimes the application fails to start, sometimes not. And since every new update introduces a new problem, the most recent iOS 6 update adds the nastyness of the build host disconnecting every 5 minutes.

    The project properties have a pile of bugs and images are not shown if they are read only, and some images are never shown.

  • LauraviatrixLauraviatrix USMember ✭✭

    I'm having the same issue... No matter what is changed, all the files are copied again, and it seems extremely slow for the little amount that we're transferring (about 20mb)

  • KrystianKrystian USMember

    I'm facing similar issues basicaly when building it takes longer also VS is losing connection to build host very frequently but before update to XS 5.4 everything was fine. Also working with storyboard is very buggy and keeps showing error and i need to click Undo most recent changes

  • C.BoerC.Boer NLMember

    Starting a debug session after stopping a previous session also seems to fail every time.

    Here's a part of the mtbserver.log:

    [29-sep-2014 15:25:38] Handling with command: [Info: CommmandUrl=Info] (27)
    [29-sep-2014 15:25:38] Attempting to acquire command execution lock, timeout set to 00:10:00
    [29-sep-2014 15:25:38] mtouch 8.0.0.63 (58b46df)
    
    [29-sep-2014 15:25:38] Command [Info: CommmandUrl=Info] finished (27)
    [29-sep-2014 15:25:38] Request handled in 3,322ms
    [29-sep-2014 15:25:38] Handling with command: [StartDebugProxy: CommmandUrl=StartDebugProxy] (27)
    [29-sep-2014 15:25:38] Attempting to acquire command execution lock, timeout set to 00:10:00
    [29-sep-2014 15:25:38] Finishing Logging Thread (output:reader) ...
    [29-sep-2014 15:25:38] Finishing Debug Thread (sdb:reader)...
    [29-sep-2014 15:25:38] Warning: Socket 'VS log connnection' failed, a lingering socket may remain open. The socket is not connected
    [29-sep-2014 15:25:38] Finishing Debug Thread (sdb:writer)...
    [29-sep-2014 15:25:38] Finishing Logging Thread (output:writer)...
    [29-sep-2014 15:25:38] Finishing Output (log:writer) Thread...
    [29-sep-2014 15:25:38] Command [StartDebugProxy: CommmandUrl=StartDebugProxy] finished (27)
    [29-sep-2014 15:25:38] Request handled in 17,646ms
    [29-sep-2014 15:25:38] stdout: Starting iPad 2
    Launching application
    Application launched. PID = 25692
    Press enter to terminate the application
    
    [29-sep-2014 15:25:38] Error: Exception while handling the VisualStudio logging connection
    [29-sep-2014 15:25:38] Got connection from Visual Studio (log)
    [29-sep-2014 15:25:38] Error: Error accepting log connection from Visual Studio
    [29-sep-2014 15:25:38] Error: Exception while handling the VisualStudio debug connection
    [29-sep-2014 15:25:38] Exception: Exception type: System.ObjectDisposedException
    The object was used after being disposed.
      at System.Net.Sockets.Socket.EndAccept (System.Byte[]& buffer, System.Int32& bytesTransferred, IAsyncResult asyncResult) [0x00000] in <filename unknown>:0 
      at System.Net.Sockets.Socket.EndAccept (IAsyncResult result) [0x00000] in <filename unknown>:0 
      at Mtb.Server.Proxy.DebugProxy.VS_IncomingSdb (IAsyncResult result) [0x00000] in <filename unknown>:0 
    [29-sep-2014 15:25:38] Exception: Exception type: System.ObjectDisposedException
    The object was used after being disposed.
      at System.Net.Sockets.Socket.EndAccept (System.Byte[]& buffer, System.Int32& bytesTransferred, IAsyncResult asyncResult) [0x00000] in <filename unknown>:0 
      at System.Net.Sockets.Socket.EndAccept (IAsyncResult result) [0x00000] in <filename unknown>:0 
      at Mtb.Server.Proxy.DebugProxy.VS_IncomingOutput (IAsyncResult result) [0x00000] in <filename unknown>:0 
    [29-sep-2014 15:25:38] Exception: Exception type: System.ObjectDisposedException
    The object was used after being disposed.
      at System.Net.Sockets.Socket.EndAccept (System.Byte[]& buffer, System.Int32& bytesTransferred, IAsyncResult asyncResult) [0x00000] in <filename unknown>:0 
      at System.Net.Sockets.Socket.EndAccept (IAsyncResult result) [0x00000] in <filename unknown>:0 
      at Mtb.Server.Proxy.LogProxy.VS_IncomingOutput (IAsyncResult result) [0x00000] in <filename unknown>:0 
    [29-sep-2014 15:25:38] Handling with command: [DebugApplication: CommmandUrl=DebugApplication] (13)
    [29-sep-2014 15:25:38] Attempting to acquire command execution lock, timeout set to 00:10:00
    [29-sep-2014 15:25:38] Error: Command [DebugApplication: CommmandUrl=DebugApplication] failed.
    [29-sep-2014 15:25:38] Exception: Exception type: System.InvalidOperationException
    Failed to get the Debug Proxy instance for this session
      at Mtb.Server.Commands.DebugApplication.get_DebugProxy () [0x00000] in <filename unknown>:0 
      at Mtb.Server.Commands.DebugApplication.StartDebugProxy (MonoTouch.Tools.Tools.Mtouch mtouch) [0x00000] in <filename unknown>:0 
      at Mtb.Server.Commands.DebugApplication.StartProxy (MonoTouch.Tools.Tools.Mtouch mtouch) [0x00000] in <filename unknown>:0 
      at Mtb.Server.Commands.DebugApplication.HandleRequest (ILoggingHelper logger, System.Object commandRequestState) [0x00000] in <filename unknown>:0 
      at Mtb.Server.BaseCommand.OnRequest (System.Net.HttpListenerContext context, System.Object commandRequestState) [0x00000] in <filename unknown>:0 
      at Mtb.Server.Listener.OnRequest (System.Object state) [0x00000] in <filename unknown>:0 
    [29-sep-2014 15:25:38] Request handled in 3,89ms
    [29-sep-2014 15:25:41] Handling with command: [KillApplication: CommmandUrl=KillApplication] (14)
    [29-sep-2014 15:25:41] Handling with command: [KillApplication: CommmandUrl=KillApplication] (13)
    [29-sep-2014 15:25:41] Attempting to acquire command execution lock, timeout set to 00:10:00
    [29-sep-2014 15:25:41] Attempting to acquire command execution lock, timeout set to 00:10:00
    [29-sep-2014 15:25:42] Command [KillApplication: CommmandUrl=KillApplication] finished (14)
    [29-sep-2014 15:25:42] Request handled in 828,799ms
    [29-sep-2014 15:25:43] Request handled in 176,625ms
    [29-sep-2014 15:25:43] Command [KillApplication: CommmandUrl=KillApplication] finished (13)
    
  • kzukzu USXamarin Team, Insider Xamurai

    Hi there.

    We've identified one of the issues affecting build performance: the msbuild targets where initially authored for running locally on the Mac, and we missed tuning one particular inputs/outputs combination for incremental builds from VS for the PNG optimization. This was causing image files to be copied over all the time. A hotfix will be available very soon.

    Also, keep in mind that now a connected build will also do a deploy, which is why you're probably seeing times more similar to the previous deploy operation (save for the known issues). A disconnected build (since you can now disconnect explicitly from the build host) will give you comparable performance to what you had before. This is just so we can do an apples to apples comparison ;).

    We're also working on further reducing the chattiness of the invocations to the remote build agent from MSBuild (this is done automatically in the background by VS given the new msbuild-based infrastructure), especially around copying multiple files (and compressing them too).

    Thanks for your patience as we continue to refine these new MSBuild targets that have been unified with XS and make for a much more consistent build across both platforms.

  • FredyWengerFredyWenger CHInsider ✭✭✭✭✭

    @kzu‌:

    I also have updated today on VS2013 and MAC (XCode) to the latest versions.

    I also can confirm the problems here and am very frustrated...

    I loose more time with such problems and bugs in XF, than I can do my (real) work.

    Additionally I have a problem since the update, that is not acceptable:

    Today, I had two complete freeze of both - app and VS2013 - when I have tried to debug iOS on iPhone5-device!

    First, the app was frozen after loading first page

    Then, also VS2013 was frozen, so that I had to shut-down it in Task-Manager (definitely not nice)!

    I never had this problems before update.

    Please confirm, that this problem also is known and will be fixed with the next update.
    (Thanks)

  • LauraviatrixLauraviatrix USMember ✭✭

    @kzu: Is this in the latest stable?

  • KrystianKrystian USMember
    edited October 2014

    Yes it looks like they haven't fixed it yet, Yesterday I've updated to Xamarin.iOS 8.4 , xCode6.1 and it introduced another issue for me - Debugger is not attaching when trying to run app on iPad even when i manually starting app it is not attaching debugger so its hard to test...

    EDIT:
    Still can debug on Device with iOS 8 but no iOS8.1

  • tomnuentomnuen VNMember ✭✭

    I reinstalled Yosemite from scratch and installed latest stable. This problem is now gone.

    If anyone has problem with running the debugger. Try to clean solution and rebuild. It works everytime fo me.

  • SuchithSuchith INMember ✭✭

    Very frustrating, after IDE update, it become dead slow. for each build need to wait for 5 min that too in device.
    And also i got stuck between some strange errors like,
    FindViewById(Resource.Id.txt) returns null and
    Invalid cast exception from textview to edittext during control initialization(where edittext used in both axml and activity file).
    which was working perfect from last few months in the previous version of IDE.
    Any workaround for this issue? , or any way to revert back the IDE to previous version.

  • FredyWengerFredyWenger CHInsider ✭✭✭✭✭

    @SuchithM: (and to all readers of this thread)

    Welcome to the club!
    There are various problems with the debugger (iOS and Android) right now (I'm not able to debug iOS and Android now for months).
    There also are various threads in the VS-Forum, very confusing and time-consuming.
    Therefore, I have opened a new thread (proposal to solve the problems on a new and professional way):

    forums.xamarin.com/discussion/33738/proposal-solving-of-the-debugger-problems-version-3-9-302#latest

    But... this seems to interest nobody (not Xamarin and also not the other pained users).
    So.. If you want to change something, read the thread and vote...!

  • SamuelCadimaSamuelCadima USMember

    I'm also experiencing the same issue, it takes 5 minutes to build and deploy a Hello World app to the Android device.
    According to the output it seems that it always installs the Shared Runtime, even if it is already installed. I unchecked the "Use Shared Runtime" checkbox on the project properties and it still installs it :neutral:

  • mbalsam_nycmbalsam_nyc USMember ✭✭

    There is a debug log that builds up and is only erased when visual studio is restarted.

    C:\Users\YOU\AppData\Local\Xamarin\Log\12.0

  • dkornevdkornev USMember ✭✭

    I'm having this problem right now, with the last Xamarin version... Any solutions?

  • mbalsam_nycmbalsam_nyc USMember ✭✭

    You can just erase the logs in that directory. There wcf tracelogs.

    Another tip to speeding up development is to make sure there are no warnings in the build.

    If there is a warning when compiling a library, instead of caching the library the next time, it will be rebuilt every time.

    I just add a list of error # that i want the compiler to ignore.

    Add this list to build > Compiler > Ignore warnings

    1591,0618,1572,1573,1574,1587,414,108,168,1522,219,162,1591,1587,1572,0162,1573,1584,1591,649,168,67,612,809,169,618,693,1066,628,114,472,429,1062,1998

    Also this page shows where all of the logs and caches are

    https://developer.xamarin.com/guides/ios/getting_started/installation/windows/connecting-to-mac/troubleshooting/

    Good luck.

  • DanielMartinSeguraDanielMartinSegura ESMember
    edited April 2016

    -

  • FranciscoGarcaFranciscoGarca USMember

    No problem at all! Every time Xamarin/VS is compiling an Entry/Label based App in one i7 16Gb, I can improve my C++ Physics engine in other "old" 2Gb MAC. Productivity lacks? Never

  • NurhakKayaNurhakKaya USMember ✭✭

    Same here, is there anyone who knows about any solutions to this problem? Thanks in advance.

  • JohnNolanJohnNolan USMember

    Still experiencing this issue in June 2016.

    Random disconnects from build host and long storyboard load times...

    Please can someone from dev look into this for us?

  • kzukzu USXamarin Team, Insider Xamurai

    I'm sorry you're experiencing this John. We have been getting pretty favorable feedback from users since we completely revamped Mac connection in v4.

    I'd like to follow up properly via a bugzilla bug report with a solution that showcases the issue, if possible.

    Also, first time a storyboard is opened, there is a know and unfortunately pretty much unavoidable lag that also happens in XS on a Mac, so it's totally unrelated to VS or the remote connection.

    Thanks in advance, and I look forward your bug report.

    /Kzu

  • ss88ss88 USMember

    Still too slow. 5 mins++

  • kzukzu USXamarin Team, Insider Xamurai

    Plz file a bug, provide a repro, and we'll take a look, thanks!

    (As an anecdotal example, if you have things with CopyToOutputDirectory=Always, you're basically opting out of the entire incremental build features MSBuild has and causing a clean build every time, which is not an uncommon mistake)

  • AdrianKnightAdrianKnight USMember ✭✭✭✭

    I have this problem as well. iOS is simply too slow :|

  • (As an anecdotal example, if you have things with CopyToOutputDirectory=Always, you're basically opting out of the entire incremental build features MSBuild has and causing a clean build every time, which is not an uncommon mistake)

    Thanks @kzu !
    That was my case with some Font files; Changed it to "Copy If Newer". Just gotta run a few more tests now to make sure it'll always work as it should.

  • TapanTapan USMember

    I have this problem for iOS and its really working too slow. Even I already do have CopyToOutputDirectory=Do not Copy
    Some time it takes more than 5 minutes. We do have single MacBook between two developer. Could this be problem?
    Thank You

  • mubimubi USMember ✭✭✭

    Having Same issue
    Taking too much time and on cancellation it shows the following error

    client build14768mubas has been disconnected while waiting a post response to topic xvs/Build/4.2.2.6/execute-task/App3.iOS/1833f6a%2FMTouch App3.iOS

  • gvsharmagorintagvsharmagorinta USMember ✭✭
    edited February 2017

    i am facing this issue from last one week and it kills so much time. Specially when i edit some resource file and tried to run the app, the IDE gets hanged and i should either reopen ide or wait for long time..
    Xamarin guys have to look at this.

  • I have the same problem, every now and then. Sometimes it helps to delete the emulator, and (re)create a new one, but at the moment nothing seems to help. The Visual Studio IDE hangs whilst deploying to the emulator. I am starting to believe that despite of the beautiful concept, Xamarin is not the way to go, simply because the environment is too unstable.

  • RubemAzenhaRubemAzenha USMember

    It seems to me the build itself is fast, but it does something after it to run the app on the device that takes way too much time.

  • DerekFoulkDerekFoulk USMember

    I'm going to get fired if my builds take this long... I am trying to figure out what the issue is, but in a nutshell- no matter what type of Xamarin project (Forms/Native, Shared/PCL), it takes literally 20 minutes to deploy the blank project to an emulator (VisualStudio_android-23_arm_phone (Android 6.0 - API 23) emulator for example).

    I've tried disabling 'Fast Deployment', that doesn't help...

    The logs obtained via Visual Studio > Help > Xamarin > Zip Logs show no errors, warnings or otherwise "problematic" entries...

    What the heck is the problem?

    The only thing the IDE has mentioned is that deploying to a 32-bit android appliance would be faster. I'm gonna try it tomorrow, but I doubt that is the issue as I have another workstation at home that I run VS 2015 and some older build of Xamarin on- and that setup has no issue deploying similar projects...

    Anyone have any ideas on what could be making these builds take so long?

    Using the following:

    Microsoft Visual Studio Professional 2017
    Version 15.0.26228.4 D15RTWSVC

    >

    Xamarin 4.3.0.784 (73f58d6)
    Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

    >

    Xamarin.Android SDK 7.1.0.41 (9578cdc)
    Xamarin.Android Reference Assemblies and MSBuild support.

    >

    Xamarin.iOS and Xamarin.Mac SDK 10.4.0.123 (35d1ccd)
    Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

    >

    Android API 23?

  • Same Problem Take So much time 10 - 15 min for Simple New Blank Project, its very weird and Force to Switch from Xamarin to Other Android Native Tool.
    Please Keep Fast Run/Debug
    Thank you

«1
Sign In or Register to comment.