none
UWP Build is extremely slow (VS 2015) RRS feed

  • Question

  • Just upgraded to Windows 10 and VS 2015.

    On a basic UWP app with some nuget references the building process takes almost 1 minute. It stays mostly at "1>  Generating native code"

    Then to create store packages it takes even longer, about 5 minutes.

    Microsoft Visual Studio Community 2015
    Version 14.0.23107.0 D14REL
    Microsoft .NET Framework
    Version 4.6.00079

    Regards

    Thursday, September 24, 2015 8:08 AM

All replies

  • Hi Jandieg,

    I think the behavior you described is caused by following two things:

    1, .NET Native imported in UWP, see this blog for more information: https://blogs.windows.com/buildingapps/2015/08/20/net-native-what-it-means-for-universal-windows-platform-uwp-developers/

    In general, the .net native will do extra step while building the app from Visual Studio, which is to compile your managed IL binaries into native binaries, .NET Native compilation is a complex process, and that makes it a little slower when compared to classic .NET compilation.

    2, Your machine environment, let's say when Visual Studio need do more calculation on the compiling, which will definitely be slow if the hardware is not that good enough, when I run the Visual Studio to start a emulator on my 4G memory machine, it will take 2mins, but it would be really fast to start on another 16G test machine.

    --James


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Friday, September 25, 2015 5:27 AM
    Moderator
  • Hi James, but I doubt because of the abysmal difference versus building for Windows 8.x. For Windows 8.x I build in less than 5 seconds on same hardware. Could be something else wrong?

    Also CPU peeks at 100% most of the time while building.

    • Edited by Jandieg Friday, September 25, 2015 11:40 PM
    Friday, September 25, 2015 10:15 PM
  • Hi Jandieg,

    Another possibility is Visual Studio 2015 use quite much resource while building the app.

    Try to build the app from command line to see if the CPU still peeks at 100%?  https://msdn.microsoft.com/en-us/library/hh924768.aspx?f=255&MSPPError=-2147217396

    --James


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, September 28, 2015 3:29 AM
    Moderator
  • it is the same for me.  Latest i7, 16G ram and a few seconds in debug.  Almost 10 minutes in release.  Also apps are so much slower to render XAML screens than under Windows 8.  I notice that native Windows 8 builds run quicker than the same project as native Windows 10 build.

    My last Windows app I think, just not worth the hassle any more.

    Monday, December 21, 2015 1:51 PM
  • I have done more testing.  Make Store App while in debug, install on Windows 10 tablet all works great, very fast.

    Change to Release and make store app.  Install on same hardware after uninstall of debug version.  Runs so much slower.  Feels very sluggish, screens take up to 3 seconds to appear.

    So apart from suffering a 10 minute build the app runs really badly.  Please give me Windows 8 style release mode back that also then runs quick when installled :(

    Monday, December 21, 2015 4:04 PM
  • Had the same experience.  Release build was taking forever to compile and was running nearly half as fast as the debug build.

    I ended up turn off "Compile with .NET Native tool chain" on the Build tab of Properties for the release configuration for the main UWP app.  It appears by default is it enabled for release and disabled for debug.

    Note the setting isn't present for any library builds.  Only the main app.

    Both the release and debug configurations build at the same fast rate now.  My release build also now runs maybe 10% faster than the debug build, while previously it was running nearly twice as slow.

    There's either something wrong with the Native build tools or they're being used wrong.  Not sure which.  The slower build time as a result of performing maximum optimization makes sense and is something I can accept living with if it produces results.  However the slower execution time is completely counter-intuitive and results in not using the Native build tools at this point.


    -- kburgoyne

    Wednesday, April 13, 2016 12:01 AM
  • The same problem as above on my App, and what was that, crazy!... it take me 2 days to compile the release build with .net native, but still running, I can't get the build done.
    Thursday, July 28, 2016 1:39 AM