WPF Performance
-
I'm finishing up on a WPF version of Reputationator, and have observed that the WPF app UI is markedly less performant than the WinForms version. Has anyone else done something similar (create a winforms and wpf version of the same app), and then observed similar results? I have to admit that I was somewhat shocked.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997 -
I'm finishing up on a WPF version of Reputationator, and have observed that the WPF app UI is markedly less performant than the WinForms version. Has anyone else done something similar (create a winforms and wpf version of the same app), and then observed similar results? I have to admit that I was somewhat shocked.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997 -
You can always find the answer you want on the internet. http://en.wiktionary.org/wiki/performant[^]
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997 -
I'm finishing up on a WPF version of Reputationator, and have observed that the WPF app UI is markedly less performant than the WinForms version. Has anyone else done something similar (create a winforms and wpf version of the same app), and then observed similar results? I have to admit that I was somewhat shocked.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997Are you using data-binding? If you are, then it should be faster than equivalent WinForms most of the time. If you are manually adding items to container controls (like list/combo controls), then it may be a tad slower.
Regards, Nish
My technology blog: voidnish.wordpress.com
-
You can always find the answer you want on the internet. http://en.wiktionary.org/wiki/performant[^]
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997Or you may write yourself the entry. :-D
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
I'm finishing up on a WPF version of Reputationator, and have observed that the WPF app UI is markedly less performant than the WinForms version. Has anyone else done something similar (create a winforms and wpf version of the same app), and then observed similar results? I have to admit that I was somewhat shocked.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997Here[^] (I hope) some insight: see the notes below the question.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
I'm finishing up on a WPF version of Reputationator, and have observed that the WPF app UI is markedly less performant than the WinForms version. Has anyone else done something similar (create a winforms and wpf version of the same app), and then observed similar results? I have to admit that I was somewhat shocked.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997Is there one area that it's slowest in? Drawing graphs, calculating stuff, etc.? (I don't use reputationator so I don't know what it spends most of its time doing.) I'm just curious, because I would have thought performance was a reason to switch to WPF. At least for UI performance, I thought that was kinda the point. I started down the WPF path several months ago, but got sidetracked by a million different things at work. I'm not sure if I'm going to go back to WPF or abandon it completely and stick with C++. I'll cross that bridge when I burn it.
-
I'm finishing up on a WPF version of Reputationator, and have observed that the WPF app UI is markedly less performant than the WinForms version. Has anyone else done something similar (create a winforms and wpf version of the same app), and then observed similar results? I have to admit that I was somewhat shocked.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997 -
I'm finishing up on a WPF version of Reputationator, and have observed that the WPF app UI is markedly less performant than the WinForms version. Has anyone else done something similar (create a winforms and wpf version of the same app), and then observed similar results? I have to admit that I was somewhat shocked.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997John Simmons / outlaw programmer wrote:
I have to admit that I was somewhat shocked.
I am shocked that you were shocked. The biggest suckage of WPF is the poor performance and I can't believe that in all your WPF sucks posts you missed that.
-
I'm finishing up on a WPF version of Reputationator, and have observed that the WPF app UI is markedly less performant than the WinForms version. Has anyone else done something similar (create a winforms and wpf version of the same app), and then observed similar results? I have to admit that I was somewhat shocked.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997No, not at all. We have converted a rather large application from WinForms to WPF and were quite satisfied. No flickering or other artifacts while updating the views and the logic behind them was the same. What exactly is not performing so well?
"Dark the dark side is. Very dark..." - Yoda ---
"Shut up, Yoda, and just make yourself another toast." - Obi Wan Kenobi -
Are you using data-binding? If you are, then it should be faster than equivalent WinForms most of the time. If you are manually adding items to container controls (like list/combo controls), then it may be a tad slower.
Regards, Nish
My technology blog: voidnish.wordpress.com
Nishant Sivakumar wrote:
? If you are, then it should be faster than equivalent WinForms most of the time.
Are you sure? I have not seen data binding improve performance. What basis do you say that. If at all I expect data-binding to degrade the performance a little bit (Reflection + late binding).
-
You can always find the answer you want on the internet. http://en.wiktionary.org/wiki/performant[^]
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997That entry appeared after the blog post saying that it wasn't a real word.
-
Are you using data-binding? If you are, then it should be faster than equivalent WinForms most of the time. If you are manually adding items to container controls (like list/combo controls), then it may be a tad slower.
Regards, Nish
My technology blog: voidnish.wordpress.com
Yes - everything involving collections is being databound. However, When I was working on a WPF project back in 2009, using binding or not using binding provided no difefrence in the UI performance (and if anything, NOT using databinding should be faster since you're probably not using reflection when performing the task manually.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997 -
Nishant Sivakumar wrote:
? If you are, then it should be faster than equivalent WinForms most of the time.
Are you sure? I have not seen data binding improve performance. What basis do you say that. If at all I expect data-binding to degrade the performance a little bit (Reflection + late binding).
Rama Krishna Vavilala wrote:
Are you sure? I have not seen data binding improve performance. What basis do you say that. If at all I expect data-binding to degrade the performance a little bit (Reflection + late binding).
My point is that within WPF data-binding works faster than when you manually add remove items, specially if you don't do the manual manipulation in the most optimized fashion. I was wodnering if perhaps John was doing that. And once both the WinForms app and equivalent WPF app use data-binding, my experience is the WPF app's faster. Except in certain situation where WPF has known performance issues.
Regards, Nish
My technology blog: voidnish.wordpress.com
-
Is there one area that it's slowest in? Drawing graphs, calculating stuff, etc.? (I don't use reputationator so I don't know what it spends most of its time doing.) I'm just curious, because I would have thought performance was a reason to switch to WPF. At least for UI performance, I thought that was kinda the point. I started down the WPF path several months ago, but got sidetracked by a million different things at work. I'm not sure if I'm going to go back to WPF or abandon it completely and stick with C++. I'll cross that bridge when I burn it.
David Kentley wrote:
I'm just curious, because I would have thought performance was a reason to switch to WPF. At least for UI performance, I thought that was kinda the point.
New Microsoft developer technologies have never been about performance, silly rabbit. :) The current dataset is comprised of about 500 items (it grows by 3-8 items every day, depending on the reputation status of the user). It should be at least as snappy as the winforms app (which uses the same calculation code).
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997 -
Rama Krishna Vavilala wrote:
Are you sure? I have not seen data binding improve performance. What basis do you say that. If at all I expect data-binding to degrade the performance a little bit (Reflection + late binding).
My point is that within WPF data-binding works faster than when you manually add remove items, specially if you don't do the manual manipulation in the most optimized fashion. I was wodnering if perhaps John was doing that. And once both the WinForms app and equivalent WPF app use data-binding, my experience is the WPF app's faster. Except in certain situation where WPF has known performance issues.
Regards, Nish
My technology blog: voidnish.wordpress.com
Nishant Sivakumar wrote:
WPF data-binding works faster than when you manually add remove items,
That is what I am surprised at. How can reflection and binding can actually lead to better performance then directly adding items? Something is not adding up here. WPF performance issues are mostly due to rendering, so I am more surprised that data-binding or not will improve the performance. Win32 (hence Winforms) rendering is actually faster. Do you know what WPF is doing to optimize the data binding which causes improvement in performance? I doubt they can bypass reflection.
-
No, not at all. We have converted a rather large application from WinForms to WPF and were quite satisfied. No flickering or other artifacts while updating the views and the logic behind them was the same. What exactly is not performing so well?
"Dark the dark side is. Very dark..." - Yoda ---
"Shut up, Yoda, and just make yourself another toast." - Obi Wan KenobiInitial display of the chart, or clicking a checkbox to show/hide a series takes almost a second (maybe a little more) to update the chart, regardless of the number of data points being displayed. The WinForms app exhibits an instantaneous change.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997 -
Here[^] (I hope) some insight: see the notes below the question.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles]That's got some pretty funny comments, the most humorous of which is the casual use of the word "trivial" when talking about WPF. Yeah - it's trivial if you don't need to color outside the lines. Reputationator has some requirements that prevent the use of Xaml in some instances. In both the winforms app and the WPF app, I build the chart objects in the CS files, mostly because it's easier to do it that way, but there are other reasons. BTW, I have a DX10-compatible video card (nVidia 8800GTX), so I don't think that's the problem.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997 -
That entry appeared after the blog post saying that it wasn't a real word.
Do you believe all the blog posts you read? If so, I've seen a few from people that talk about the reptillian aliens that are controlling our planet from secret underground lairs. :)
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997 -
Initial display of the chart, or clicking a checkbox to show/hide a series takes almost a second (maybe a little more) to update the chart, regardless of the number of data points being displayed. The WinForms app exhibits an instantaneous change.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997That is strange. Our program was a webservice client and the WinForms version was based on an expanded MVP pattern. We ported the little MVP framework to WPF, so that we could continue to use the logic of the WinForms version and only had to redo the views themelves. Naturally, the data access over the webservice did not get any faster or slower, but we have had no noticable further delay. The views are WPF user controls and data is usually supplied by the presenter, so little to no data binding is used. Perhaps this is what slows you down. Edit: Fixed some typos
"Dark the dark side is. Very dark..." - Yoda ---
"Shut up, Yoda, and just make yourself another toast." - Obi Wan Kenobimodified on Thursday, August 25, 2011 9:05 AM