WinUI 3 Performance: A Leap Forward

17 hours ago (github.com)

> benchmarks (like this one: https://github.com/Noemata/XamlBenchmark), WinUI 3 is currently measurably slower than both WPF and UWP. WPF is 20+ years old and even it is not native!!!.

Older stuff is generally faster because it had to be built in a more resource poor time. Maybe the WinUI devs should be forced to work on systems with the Minimum System Requirements. Heck, maybe all Microsoft development should be done like that, so that some focus on performance is there from the start, instead of as an afterthought.

  • If I recall right, Windows 8 and Windows Phone 7/8 during the 2010's were all developed on low end devices.

    Both had huge issues UX wise, specially desktop, but performance and stability was never a issue.

    Developers should always test their system on the minimum system requirement that they allow the system to be installed...

    I remember I complained about WinUI performance years ago, and they told me at the time that "performance" was not the focus...

    • I am sure this was posted so many times before but someone should reverse engineer the windows 8 era windows phones. Those were ridiculously smooth compared to android and ios with just 512mb of ram.

      4 replies →

  • It is quite easy to know why.

    WinRT is the Windows team final response to Longhorn, but lets do it with COM and C++, which started in Vista.

    This is why all major new APIs since Vista are COM based.

    So you get an UI framework with reference counting all over the place, and application identity, which is a kind of sandboxing, for the capabilities like in mobile OSes or macOS.

    On the UWP subsystem, you get .NET Native and C++/CX, whose runtimes are WinRT aware and can elide those RC calls.

    Whereas using WinRT on Win32, means regular .NET and C++, via interop frameworks CsWinRT and C++/WinRT, plain libraries.

    So there is no elision, it is AddRef/Release all over the place.

    • I don't believe it.

      Reference counting is a virtual function call + an integer operation. It doesn't happen that often either because objects in UI frameworks are very long lived. C++'s shared_ptr, Rust's Rc, and Swift, don't typically cause performance problems either.

      6 replies →

    • > WinRT is the Windows team final response to Longhorn, but lets do it with COM and C++, which started in Vista.

      Not sure what you mean, I was using COM and C++ for Windows development in the late 90s.

      > So there is no elision, it is AddRef/Release all over the place.

      ...and constructing an object is an insanely complex (and expensive) operation.

      1 reply →

I run macOS every day, and while I find Apple Silicon shockingly fast - I'm surprised at how shockingly slow Finder seems to be.

This might be off topic, but wish Apple would focused on Finder performance (app loading, window refresh, etc) like this blog post by Microsoft.

And in case you're curious, my disk is only using 250GB in use (50GB for Apps, 150GB for System Data, 50GB for macOS)

  • The “Apps” app is so bad on macOS too (seems built off of Spotlight?). I’ll type the exact app name and it’ll suggest the one on my phone, an installer in Downloads, etc..

    No one dog-fooded that thing.

    • Someone has realized the search results are insane, as there's at least one obvious fix buried in settings:

      I open Finder, click on Applications, search "Google Chrome". Top results? MarketingAnalytics.yaml, aria-proptypes.md, and so on, from some project I cloned off of Github into my home directory at some point. I guess the file contents include "Google Chrome"?

      Clearly insane, but under the "Advanced" finder settings, it's easy to find "Search the Current Folder". Suddenly, you get the result you'd expect.

  • Explorer.exe is far slower. It was one of the reasons I switched to macos after being a hardcore microsoft fan for many years. explorer would be so slow with fodlers that has a large number of files it would darastically impede my workflow. Macos is far superior IMO than windows when it comes to daily use efficiency.

    • I decided to tryout W11 in vm to see how it works in comparison to W10 and damn, current Explorer not only is slow but feels like taped together with at least 3 different UIs.

  • Finder is one of the worst pieces of software I've used and I have no confidence in Apple ever fixing it, or even being able to in theory.

    • I had to use MacOS recently and wasn't impressed by Finder. I am convinced that the best file manager on the market bar none is Dolphin from KDE software suite.

      1 reply →

I'm stilll shocked that we're reinventining the wheel of things that were solved 20+ years ago, like UIs, and somehow making them massively more resource intensive

  • It's tempting to look at it that way; but that's being over-reductive. UIs of today are not the UIs of 20 years ago. Users expect much more from today's UIs, and UI toolkits necessarily get more complex as a result in order to deliver on those increased expectations.

    And if you don't agree, this is Windows we're talking about. Nothing's stopping you from creating your application with Win32 except for the fact that it's going to look and feel like an application from 20+ years ago.

    • > Users expect much more from today's UI

      This is funny. You know, users also want games to be ridden of DRM but I don’t think the big companies cared about that for a long time. Users also want a lot of things that they never got, like a visible scroll bar sometimes.

      And since Windows is primarily OEM or enterprise, I don’t know what users are going to do if Microsoft sticks to say Windows 7 UI? Like, uninstalling Windows and switching to Linux? Oh yeah, they are doing that right now.

      Sure users want A or B, but that’s not important. What’s important is some idiot VP saw something and decided to push on, and other managers jumped in to grab the pie.

    • What do they expect that WinUI provides that classic WinAPI UIs don't?

      This is not a rhetorical question. I do see some things, like antialiased drawing, etc (GDI is outdated, but I'm not convinced newer drawing could not be added.) But in general the classic ones work, including with accessibility, and are highly functional and batle-tested.

    • > Users expect much more from today's UIs

      .. and get much less. Especially in accessibility. We've lost things like ubiquitous accelerator keys and even basics like "being able to tell where the edges of controls are or which is the active window".

      The only real advantage WinUI has over WinForms is "responsive" resizing and display scaling.

Out of sheer curiosity I gave it a quick "search" how one goes from client code instrumenting WinUI to then pixels appearing on the screen, and it seems like quite the indirection-ridden and generalized journey, which I fundamentally can't imagine being particularly cheap. Maybe it's just my unfamiliarity with this world though, never wrote a graphics application end-to-end (i.e. rasterization included) on my own.

Ironic how in supposedly tech company nobody gives a shit about doing great technical work unless it aligns with some VPs goals.

  • A company is a company. For some weird reason techies used to think that they were special, but that time came to an end

  • Not ironic at all. VP didn't become VP by doing great technical work. They made the VP before them look nice.

  • Capitalism cannot produce good software, just like it cannot produce good art, or children.

  • At the end of the day, they find a way to get rid of you if you don’t, even if the VP would endorse your efforts. I understand what you’re saying and hope you understand why it happens, it took me years, and pain.

  • I mean… that’s kind of the goal really. If you are a leader, you want the people under you to go along with your priorities. That’s a feature, not irony.

    I think another way to get to the same effect is to say “A company needs good leaders”.

As someone who builds desktop apps:

Is there any reason I would use this over something cross-platform like EGUI? I am kind of over software being OS-specific; this is one of the biggest compatibility mistakes we've made. Along with the related process of making drawing pixels on a display a complicated process!

  • WinUI made sense when windows actually had a proper design guideline, and touch was also the focus. So using WinUI was just easier as the controls were all following the guidelines, and if you wanted to offer a native experience, that was the best choice.

    But it's been long gone that time where Windows had a minimum cohesive guideline.

  • Even if I wanted a Windows-specific UI, I still wouldn't choose WinUI 3. You can ignore it.

    At my day job, I choose Windows Forms with Blazor mixed in. That's old reliable Win32 tech + modern web tech, without any modern Windows tech mixed in.

    • Win32 is absolutely the best GUI system, you get the most clean, performant and easy-to-use results.

      I wish Microsoft just sticked to Win32 instead of reinventing the wheel with worse solutions.

  • Well, from egui's own page:

    > If you want a GUI that looks native, egui is not for you. If you want something that doesn't break when you upgrade it, egui isn't for you (yet).

  • I too don't want to write OS-specific stuff, but here's some counter arguments.

    With egui, it's an immediate mode GUI rather than retained mode and that has trade-offs: https://github.com/emilk/egui#why-immediate-mode. It's going to use more CPU (and battery power), there can be jitter and things shifting after the initial rendering, and other stuff. I think egui is very different from most cross-platform and platform-specific libraries.

    With .NET MAUI, you're getting native controls, but you're now using a layer that's trying to use native controls on the underlying systems that don't always align completely. A lot of things act mostly the same across systems, but some things don't totally.

    With Flutter, your app is going to be larger in part because you're shipping a rendering engine, runtime, widgets, etc. Does it have the look and feel you want? Maybe. That's a bit subjective. Does it handle all the little things correctly? When I'm using an app, I want it to scroll like how I'm used to scrolling working on my system. If you have differently styled buttons, I don't care, but if the scrolling feels wrong, it's going to annoy me. And there's so many little things.

    Frankly, one of the reasons why Electron often does well is that a lot of the little things "feel right" because the UI is essentially a Chromium-rendered web page which users are used to interacting with. But that has downsides too - shipping a web browser with your app and the memory usage.

    Heck, Qt apps in Gnome or GTK+ apps in KDE can look/feel "off".

    And it'll all depend on your ecosystem. Often cross-platform solutions are lacking in accessibility - sometimes completely missing, sometimes half-baked and it works in some parts and not in others or just is janky. Memory usage is often higher. Many little things that make an app feel right might not be there. Many have slower startup times since they're loading a bunch of stuff that native apps don't need to. And it really depends on what approach the cross-platform library is taking to determine what is going to cause pain.

    So you kinda have to pick your poison and what's acceptable to you will vary depending on your goals and tastes. Maybe React Native is the way to go for you with lots of native controls available and the feel that provides and the performance and size is acceptable.

    If you create a Flutter or Kotlin Compose Multiplatform or AvaloniaUI app and put it on the web, it's not going to feel right as something like HN does. Right-click, text selection, etc. are all going to be different or missing. If you're creating a solitaire game, maybe that doesn't matter - you get desktop and web in one go and it's not a big deal.

    But you have to know what you're building to know if the trade-offs being made are good ones. This isn't meant to sound anti-cross-platform, but as someone who has suffered some pain in this area, I guess I just wanted to impart that it isn't all sunshine and rainbows. Some times it can still be worth it, but just go in with your eyes open.

  • Not really. At least not directly.

    But it is used to implement various parts of Windows, such as the File Explorer, so any improvements are helpful for general system performance.

Will any of this translate to Windows programs like File Manager? Whatever their Image viewer is even called? For some ungodly reason, on my last remaining Windows Device, which is a Surface Book 2 (a Microsoft made laptop!) with very vanilla configurations, everything slows to a crawl in the file manager and if I try to view images on a directory and do the "right arrow" for next or "left arrow" key for previous. It baffles me how something that never had so much slowness can be completely FUBAR'd I miss when Windows had standard apps that were very optimal and didn't slow and ruin my experience. I find myself opening that laptop less and less, and one of these days I might just slap Linux over it.

Nice to see. I wonder how feasible it would be to build a plain C interface… would be nice for building bindings to other languages.

  • If you enjoy calling COM vtables, and doing the reference counting by hand, by all means.

  • Painful. A lot of the Microsoft interfaces these days are asynchronous and are built around the dev experience of c#/c++ with libraries/runtimes that do a lot of the heavy lifting. So you end up calling functions with ridiculously long names and they aren't like good old win32 calls where you pass in some parameters and you get a result back. Instead you create objects to pass function pointers and data around and who knows when you'll get your result values back.

The user experience of WinUI 3 isn't the worst I've seen but the developer experience is absolutely awful. I tried to make a simple app with it and the number of hacks I needed to get it to look and feel the way I almost wanted was horrible. And the documentation sucks. I had to read the system level implementations of controls in order to figure most of it out. It's great those implementations are available to read, at least, but OH MY GOD

Also seeing stuff like text fields re-implemented from scratch in XML scares me. I don't like to see that.

The user experience is the way it is because they want it to be. This is at best optimizing one small component which as we all know can be done infinitely well and still have a negligible effect on the use of the system.

How about F# support? Until then, happy to support Avalonia.

  • It won't happen, already on UWP you had to avoid specific F# code idioms that could generate MSIL that the .NET Native compiler wasn't happy with.

    With WinRT on top of Win32, the .NET Native runtime support now lives in CsWinRT, where they also only have C# into account, not even VB as it used to be on UWP side.

Wow, they are actually starting to care about quality. Color me surprised.

  • Don't worry, once enough people come back, they'll roll back in the ads and the intrusive performance-killing features and the cycle will repeat all over again

    • I can't downvote this comment, because I've observed exactly this practice happen, again and again, over the past three decades.

      I still remain naively hopeful and cheer them on, however.

  • Anyone who tried to do serious native windows dev has been burnt so often by Microsoft. I really wanted to give them the benefit of the doubt with WinUI 3 but I really cannot anymore. Until proven otherwise I expect absolutely nothing to improve meaningfully. It’s extremely sad for those of us who were dumb enough to think Microsoft take on modern GUI would be interesting to follow closely, we are in 2026 and WPF is still the way to go IMHO.

  • Nah, mostly marketing.

    The only people that still buy into this are folks that never developed anything with WinUI, aka WinUI 3.0.

    Since Windows 8, they messed up the development experience so bad, that they managed to turn many advocates like myself into vocal critics.

    We avoid anything WinRT unless there is no way to do the same with Win32, classical COM (WinRT is an evolution of COM), or regular .NET (Forms/WPF).

    And also post regularly about the actual state of the tooling unlike Microsoft's marketing posts.

    Example, they keep mentioning about WinUI being supported in C++, but never mention how bad C++/WinRT dev experience has become, or that the framework is in maintenance, and has been superseded by WIL.

  • Their recent post about explorer performance was “we raise clocks when you launch explorer” rather than an actual fix