Do you know of any hacks that can decrease build times?

smchughinfosmchughinfo Member ✭✭
edited May 3 in General

I'm waiting for my app to build right now, lol. It can take anywhere from 10 seconds to 5 minutes but usually it takes at least a minute or two. I tend to develop by making small changes and testing them out so I guess you would say that programming with Xamarin is analagous to playing a first person shooter at 15FPS.

I do a few things.

  • If I'm doing Android I unload iOS and vice versa.
  • In Android leave the default build settings (Use Shared Runtime, Use Fast Deployment, Linking None)
  • In iOS I do the same thing.

Build times are still way in the red for me. Do you have the same problem? Are there any hacks I can do so that I can developer faster? It honestly feels like I'm stealing from the company because I spend quite a bit of my time daydreaming as I'm waiting for Xamarin to build.

Okay so to give you one idea of a hack that I've thought of is if you do your Xamarin app as a WebView and then just change the html/css/javascript so that you don't even have to build but then it really isn't a "real" Xamarin app.

Tagged:

Posts

  • JohnHardmanJohnHardman GBUniversity mod
    edited May 3

    @smchughinfo said:
    Build times are still way in the red for me. Do you have the same problem?

    Yes. Building with XF has felt like stepping back in time 25+ years in terms of build times. Particularly for iOS, I can walk downstairs, put the kettle on, raid the fridge, make a coffee, and walk back upstairs, all before the build has finished. I haven't worked in an environment where that has been possible for a long, long time.

    @smchughinfo said:
    It honestly feels like I'm stealing from the company because I spend quite a bit of my time daydreaming as I'm waiting for Xamarin to build.

    Think of it as being in design mode - your brain is thinking about how to do the next thing whilst waiting for VS to slooowwwly build your current Xamarin code.

    For me, if I'm active in the forums, that usually means that I am waiting for a build.

    @smchughinfo said:
    Okay so to give you one idea of a hack that I've thought of is if you do your Xamarin app as a WebView and then just change the html/css/javascript so that you don't even have to build but then it really isn't a "real" Xamarin app.

    If using HTML/CSS/JS, you'd probably use a different framework/wrapper altogether. I've done some work with Cordova in the past, but there are other options too.

    @smchughinfo said:
    Are there any hacks I can do so that I can developer faster?

    (1) Add a UWP project, and do most of your development cycles building the UWP project, rather than Android or iOS (caveat - I'm nervous about how long Xamarin actively support UWP for).
    (2) Also, develop pages in XAML and make use of one of the "preview" tools available (see the many other threads on that subject).
    (3) If you are already developing for UWP, and are automating UI testing, consider Appium or something similar. At the moment (and I am not aware of anything happening to change this), you can write Xamarin.UITests for Android and iOS, but you have to write them all over again using another tool if you want automated UI testing for UWP. Switch to Appium and one set of tests should (I haven't done this yet) work for Android, iOS and UWP, so halving the time to develop UI tests. I'll be looking into doing this soon - if it works in practice, I'll be junking my existing UITests.

  • smchughinfosmchughinfo Member ✭✭

    Oh man, I totally forgot about UWP! You are going to save me so much time! ...and for reasons I can't run it on this computer. :'(

    That is a really good suggestion though. Anyhow, I have to get back to work. My build is done.

  • gviddygviddy USMember ✭✭

    Do you use VS on Mac? I am surprised at how much faster it is to run and deploy than using VS on Windows.

    I don't experience all the lockups that VS on Windows gives me either. Maybe give that a go? I don't think any Microsoft employees are actually using Windows anymore, I am guessing they all use Macs now.

  • JamesLaveryJamesLavery GBBeta, University ✭✭✭✭✭
    As above - I've found VS on Mac to be much faster.
  • NMackayNMackay GBInsider, University mod

    If your doing UI tweaks in XAML, check out LiveXAML, it will speed up your dev significantly. UWP suggestion is a good shout too for code debugging.

Sign In or Register to comment.