Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is UWP 10 development so slow?

Does anyone else there have any issues with a very sluggish development experience in VS 2015 writing apps for the Universal Windows Platform 10? Compiling, debugging, even switching between windows is painfully slow compared to working with a similar, basic WPF application.

I have not been able to find any mention of this experience on Google, which leads me to wonder if there's something in my setup that is throwing a monkey wrench into UWP dev.

Has anyone experienced this, or know of any ways to speed up development?

Update

The context of this question is compiling in DEBUG mode, not RELEASE (.NET native) mode.

like image 679
BCA Avatar asked Sep 29 '15 23:09

BCA


People also ask

Is UWP faster than WPF?

WPF is another UI framework, and UWP uses many concepts that you find in WPF, like XAML, data binding, styles etc. That means that a WPF developer gets up to speed with UWP quite fast, and vice versa. But WPF is not a UI framework that C++ developers can use, for WPF you have to develop with .

What has replaced UWP?

As you already know, WinUI is Microsoft's follow-up to UWP. As the successor to the UWP platform, Microsoft has invested heavily in the WinUI platform.

Can UWP run on Windows 10?

UWP is one choice for creating apps that run on Windows 10 and Windows 11 devices, and can be combined with other platforms. UWP apps can make use of Win32 APIs and .

Does UWP work on Windows 11?

Compatibility. UWP is a part of Windows 10, Windows 10 Mobile and Windows 11. UWP apps do not run on earlier Windows versions. Apps that are capable of implementing this platform are natively developed using Visual Studio 2015, Visual Studio 2017, Visual Studio 2019 or Visual Studio 2022.


2 Answers

Just my 2 cents, but i recently discovered that there is a big issue when working on UWP project.

I was working on my project with Xamarin in order to have an app compatible on Android / iOS / WP8 and UWP.

But working in Visual Studio 2015 Update 2 (With W10) recently, i had very slow performances, a very laggy interface, Build, Debug, XAML, everything were very slow.

Then i just discovered something very awful: If you set your UWP project as the starting project of your Solution, Visual Studio 2015 become slow as hell ! I don't what is the real issue but this has been a real issue for me!

I set my startup project on an other project in the solution, other than UWP and WP8. If i need to debug, i launch them using right click in the solution explorer, then Debug.

Since then, VS2015 has no performance issue for me.

like image 96
Guillaume ZAHRA Avatar answered Oct 06 '22 00:10

Guillaume ZAHRA


Fascinating... simply fascinating.

Turn off "Compile with .NET Native tool chain" on the Build properties of the main UWP app. UWP libraries don't appear to offer the native tool chain option.

I was fighting the issue of why my file parsing application took about twice as long to execute (not build) as a release build than as a debug build. Completely the reverse of what should have happened. I also happened to note the long time to complete the release build, but it was a secondary issue for the time being.

If you watch the output window during a complete rebuild, you'll note any libraries you have will build as quick as you're used to. Then the main app will be the one that bogs down -- a LOT.

Check the Build properties for your projects and note only the main UWP app has the "Compile with .NET Native tool chain" option. The libraries don't have it. Also, by default only the release build has it enabled. The debug build doesn't. Sure enough, turn it off on the release build and the release build starts completing as fast as the debug build.

Then strangeness of strangeness... my UWP app release build now runs about 10% faster than the debug version when it used to run nearly twice as slow.

This is all VERY counter-intuitive. A native build should run just as fast, if not even a tiny bit faster, than the non-native build. The compiler under Visual Studio certainly has the option of putting much more hard work into optimizing the build for the processor.

I wonder if there is anything else published about problems with the native build tools, and whether there's an explanation. The slow build time I can understand completely if the build tools are munching away a lot harder trying to optimized for the specific native processor. However the fact the native code runs dramatically slower than the non-native code is completely counter-intuitive. It doesn't seem to make sense that MSFT would have bothered to release the native build tools under such circumstances, which leads one to wonder if the tools are being used incorrectly or some other misunderstanding is a'foot.

like image 23
kburgoyne Avatar answered Oct 06 '22 00:10

kburgoyne