Hi Patrick,

3.5 SP 1 and 4.0 seem to have eliminated most if not all of my gripes. However, 
I'd say the kinds of apps I build are very different to yours - mine tend to 
just involve lots of pages and list boxes :)

For the typical data/process-centric application (think 
http://www.istartedsomething.com/20080109/frog-design-wpf-sexy-enterprise-software/
 or the kinds of apps built by http://lab49.com/), it's hard to imagine 
switching back to GDI+ for these. For the most part, this isn't because of 
graphics - it's actually because I find the data binding, layout and templating 
features make it easier to surface the information I want quickly. With Windows 
Forms (or C++/GDI+) I'd spend days just trying to show a list that isn't a 
DataGrid :) As long as the performance hit of WPF doesn't become a bottleneck, 
it's a great platform.

For the kinds of apps you're building, it's hard to see the compelling side of 
WPF. Perhaps you'll get benefits from the non-core parts of the app by using 
data binding/layouts/etc., but for your core mind map control, I'd probably 
agree with you that it's not a good fit. I'm sure if you dedicated enough time 
to it you could make it work, but that would go for C++ with OpenGL or GDI+ 
too. There's something beautifully simple about GDI+'s immediate mode rendering 
that makes it great for scenarios like that. Without having much experience in 
the high-performance rendering world it's hard to know for sure.

I also think ISV's are more likely to be worried about things that we'd 
generally brush over. For example, I can confirm that the RichTextBox is slow - 
but until it's completely unusable, we can usually tell users to "live with it" 
if there's no easy alternative - the joys of a captive audience. As an ISV in a 
competitive market you don't have that luxury, so you're probably more likely 
to spend time trying to solve this. But maybe you'd experience the same 
problems using MFC controls? I hope Evernote release more information on their 
experiences going the other way.

Putting it this way, if we compare the rendering performance of DirectX, 
OpenGL, GDI+ (in some scenarios) and WPF controls, WPF would probably come out 
on the bottom - and for most of us, that's not a problem, because our apps 
aren't so sensitive or don't do much in the way of complicated rendering. But 
if your application is sensitive to this, and you go with the slowest option, 
it's not surprising that you might have problems. To be fair, back in 2007 
everyone assumed WPF would be closer to DirectX/OpenGL than GDI.

Just out of curiosity, how do you find the performance of OnRender compared to 
say WriteableBitmap? And does cached composition help at all?

Paul


From: [email protected] [mailto:[email protected]] On 
Behalf Of Patrick Klug
Sent: Thursday, 28 October 2010 10:54 AM
To: [email protected]
Subject: Evernote ditches WPF

Seems like Evernote has ditched the WPF platform and rewritten their complete 
client in C++

http://blog.evernote.com/2010/10/26/evernote-4-for-windows-is-here/

Reasons cited are the blurry fonts, slow startup times, large memory footprint, 
and poor support for certain graphics cards. They were using 3.5 - I wonder if 
.NET 4.0 would have solved these issues to a satisfying degree or if C++ apps 
are simply the better choice for very popular client applications.

I have been working with a very small team on NovaMind, a mind mapping 
application for Windows and Mac (www.novamind.com<http://www.novamind.com>) and 
we have decided to rewrite version 5 of our Windows client in WPF. The previous 
version was GDI+/GDI/C# and the main reasons for moving to WPF was the ability 
to use hardware accelerated graphics, animations and sub-pixel rendering for 
fonts. The move to WPF has been... very challenging.

At the moment we are finishing a major rewrite of the drawing layer. The 
rich-text controls in WPF were just too slow and databinding and templating 
seemed to be the slowest part of our application. - We couldn't actually verify 
the exact cause for the performance issues in the application since it doesn't 
seem to be possible to measure this 
(http://stackoverflow.com/questions/3305733/test-wpf-control-performance) but 
experimental prototypes confirmed that the rich-text controls and the XAML 
templating is slow.

We had implemented control recycling and tried to cut down on element counts 
and tried many other things but in the end it seemed that we had to rewrite the 
drawing layer completely.

In this rewrite (which took us more than two months) we had to implement our 
own rich-text rendering and measuring control (something I always wanted to 
avoid since it is quite cumbersome and complex). We also rewrote all our map 
elements and are now drawing most of the elements on the canvas ourselves by 
overriding OnRender.

Performance seems more acceptable now. Opening a fairly normal sized mind map 
with around 600 topics takes now around 4 seconds instead of the completely 
ridiculous 40+ seconds before the rewrite. Of course in GDI+ this was almost 
instantaneous.

After we finish this performance rewrite we can finally start implementing our 
presenter feature, which was the main reason why we moved to WPF in the first 
place.

Preliminary tests show that animating something smoothly and nicely is not at 
all as easy as I would have expected and while I am confident that we can 
create something truly outstanding in our market I know that it will be just as 
challenging as it has been, ever since we have started with WPF (2007). It 
seems that nothing we try to do 'just works' - I don't think that we use a 
single standard control that we didn't have to tweak in some way to make it 
more usable.

What are you experiences? Have you or your team ever thought about ditching 
WPF? Do you regret betting on WPF?
_______________________________________________
ozwpf mailing list
[email protected]
http://prdlxvm0001.codify.net/mailman/listinfo/ozwpf

Reply via email to