5 ms·
Looks sharp! I've worked with WPF quite a bit in the past and still think it's the nicest UI framework from a developer perspective. How's the performance these
by trulyrandom 5y ago
Looks sharp! I've worked with WPF quite a bit in the past and still think it's the nicest UI framework from a developer perspective. How's the performance these days? Compared to plain Win32 applications, I remember it feeling very sluggish once your WPF application has a few dozen controls.
- spaetzleesser 5y agoIt’s still slow to start up. That’s partially because of .NET in general. There is a lot of code to read and JIT before a .NET application runs.
- mattmanser 5y agoYou're like 5 years behind, .Net has been snappy for years since core released.
- alophawen 5y ago.Net != .Net Core, even though they rebranded it as such. That's just revisionist marketing
- jcelerier 5y agoWhat's a snappy .net app ? The few ones I know definitely feel slower than e.g. Qt apps
- ripley12 5y agoPaint.NET is probably the best example of a good, fast widely used .NET app.
- jcelerier 5y agoThat's the first example of "not fast" that came to my mind actually.
- ripley12 5y agoSeriously? The effort Rick puts into Paint.NET performance is unreal (check out his Twitter sometime). I've found it to be impressively fast, especially for how much functionality it has. FWIW it was only recently migrated to a modern .NET version, give the latest version a spin if you haven't already.
- filmgirlcw 5y agoAgreed. Rick’s work on Paint.NET is just so impressive.
- spaetzleesser 5y agoPaint.NET is a good example for how much effort it takes to develop a .NET app that has decent performance especially once it is a little bit complex
- oneplane 5y agoJust because it's impressive doesn't mean it's not slower than other systems. It's not mutually exclusive.
- vxNsr 5y agoOdd, I've been using it for the better part of a decade when GIMP is too much and I've never felt like it was slow.
- fistynuts 5y agoIndeed, if anything is slow, it's GIMP.
- boznz 5y agoMore like hardware is now hiding the .Nets overheads
- zip1234 5y agoNo, both have gotten much faster. This is just one release of performance improvements: https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-6/ https://devblogs.microsoft.com/dotnet/performance-improvemen... It is worth noting that WPF can run on this latest version of .NET
- spaetzleesser 5y ago“Snappy” is subjective. It definitely has improved But it’s still far away from what you could do with Win32 or MFC.
- ripley12 5y agoI think that's only partially right. .NET apps can be published with AOT code (ReadyToRun). WPF apps are still pretty slow to launch with ReadyToRun enabled; I haven't profiled it to see why, but I suspect it has a lot more to do with WPF (somewhat abandoned for a decade, and the XAML bits have always been slow) than .NET. In my experience the JIT penalty at startup isn't as bad as people think, the .NET JIT compiler is really fast and the average console app is very quick to start up.
- layoric 5y agoReally? I did about a year of it and I must admit it was not a fun year (~2014, so a while ago). Styles and binding were so overly verbose, and I felt like I was constantly fighting the tooling. The dev loop was horrible compared to anything related to building UIs for web apps. Interested in your experience and why you think it is a really nice UI framework from a developer perspective?
- TravHatesMe 5y agoWPF was ahead of its time when it was released in 2006. It might have been the first to use data bindings and popularize the MVVM pattern. Web UI frameworks were barely in existence and webpages typically didn't have that desktop-y/SPA feel. WPF was king for a while until web took over.
- DaiPlusPlus 5y agoDeclarative data-binding wasn't anything new in WPF: it significantly postdates ASP.NET WebForms which had declarative data-binding, though, yes: the web doesn't count because web UIs aren't stateful in-memory on the server. I feel MVVM is an anti-pattern: it necessitates long-lifed mutable instance state (the object of the class of your view-model) which is much harder to reason about (for example, try updating a bunch of properties in response to another property getting updating), but for me, the worst part is the inability to differentiate or identify the source or origin of new data that appear in a property setter: it's very difficult to determine if a TextBox TextChanged event came from a user-initiated action, was set by another method in the class - or was a knock-on property change - because a property setter doesn't have an EventArgs parameter. This can cause ViewModel event-handlers to get caught-up in infinite-loops or at the very least sending large amounts of inconsequential and unnecessary event-messages around and invoking (potentially expensive) property-setters and getters. I still agree that MVVM was a huge improvement over simply subclassing widgets and windows like we do in WinForms, VB6, Delphi, and JWT/Swing - but all MVVM brings you is separation between UI and Business/Domain in name-only; your ViewModels are still inevitably going to end-up with dozens of new properties bound to sone arbitrary presentational XAML attributes. XAML alone is a decade past it’s time. It’s hugely verbose and is filled with so many gotchas (wanna bind a bool property to a control’s visible/hidden state? Not without an extra 50+ chars of binding params and value-converters). XAML also falls for the pitfall of assuming a GUI can always be modelled as a strict hierarchy of containers and controls. Overall, XAML feels like what the Microsoft of the mid-to-late 1990s wanted to turn HTML into. ——— I hope I don't sound like another React fanboy (and I personally use Redux, not React)- and I'll argue that modelling state as a history of immutable, almost serialized, state trees is fantastic for so many things - especially typical database/business application work, but it's also utterly inappropriate for so many other kinds of applications (like, you wouldn't serialize the entire state of a raster image of HTML <canvas>, or re-run an append-only list of drawing instructions (like PostScript/Windows Metafile) for Canvas 2D context or even WebGL - BUT overall the Reflux/Redux/React design of a strict one-way flow of data and state brings so much clarity and makes it easy to see how different components (even in an abstract sense) interact with each other: they don't! It really does force you into a better way of thinking about program code, state and flow. —— Not that it matters: Microsoft has completely dropped the ball on keeping the Win32 desktop dev-story alive. WinForms is uncool and terrible but there is no faster alternative for putting together a quick simple form in an EXE. If you use WPF you’d still be trying to get MahApps working, ----- > Web UI frameworks were barely in existence and webpages typically didn't have that desktop-y/SPA feel. WPF was king for a while until web took over 2005-2006 was after the start of "Web 2.0" and after AJAX had been established - but mostly: when Firefox had already been out for 2-3 years and for that companies that were willing to go all-in on Firefox for their users, they really could have have desktop-quality SPAs made using Firefox's massively superior support for modern CSS techniques that IE6 had avoided for over 5 years at that point - can you imagine Google not releasing a Chrome update for 5 years? So it was IE6's fault that better SPAs weren't around on the Internet - but it was also IE6's fault that so many companies had the 1990s near-equivalent of an SPA: ActiveX-heavy intranet sites that only worked in IE6. That point amuses me.