Command performance problem
-
With a bit of hack we were able to use command to return the current value of the target (as well as IsEnable), so we could nicely update color pickers, etc... on the control tool bar. Now the problem is we use lots of command in our application (about 300). And every time the user key one char in we do heavy processing as well (relayouting and repainting all visual information), and now that we have command, on top of the heavy text processing we've got all command updating (it's the behavior of the input manager to fire up an update of the command sources on key up). So... since we moved to command we suffer huge performance problem due to the above reason. Is there a way to disable command updating for a little while (while typing text) or. In fact, ideally, I would like to disable only some command updating (whereas text command should still update...) Any tip?
-
With a bit of hack we were able to use command to return the current value of the target (as well as IsEnable), so we could nicely update color pickers, etc... on the control tool bar. Now the problem is we use lots of command in our application (about 300). And every time the user key one char in we do heavy processing as well (relayouting and repainting all visual information), and now that we have command, on top of the heavy text processing we've got all command updating (it's the behavior of the input manager to fire up an update of the command sources on key up). So... since we moved to command we suffer huge performance problem due to the above reason. Is there a way to disable command updating for a little while (while typing text) or. In fact, ideally, I would like to disable only some command updating (whereas text command should still update...) Any tip?
Lloyd, I'll send Josh Smith an email about this question and see if he has some advice for you. Do you have 300 commands all enabled all the time? Does this problem only happen on one control or one form, or is it application wide? What sort of application is this?
Cheers, Karl
My Blog | Mole's Home Page | How To Create Screen Capture Videos For Your ArticlesJust a grain of sand on the worlds beaches.
-
Lloyd, I'll send Josh Smith an email about this question and see if he has some advice for you. Do you have 300 commands all enabled all the time? Does this problem only happen on one control or one form, or is it application wide? What sort of application is this?
Cheers, Karl
My Blog | Mole's Home Page | How To Create Screen Capture Videos For Your ArticlesJust a grain of sand on the worlds beaches.
well, I'm not really working there anymore but the problem still haunt me!... the application could be found there: http://www.novamind.com/[^] All the button/controls on the ribbon are command source. There are lots of them. Most are enable all the time (although one could argue that invisible control should be disable, I'm not sure about what happen the ribbon control is a 3rd party, anyway some panel have a lot button). What really slow down the app is text imput. The main view is a legacy GDI+ control. The input text box in the view is a custom made text view (not a subclass of TextBoxBas, but of Control with custom text rendering via interop with Uniscribe, but with good perf, as it is able to paste 400k of text rich with the same perf as word). But in NM3 it was already limit, big map slowing the application perceply (as not only we should layout the text, but move all the map's graphics and the autolayouting algorithm is time consuming) Anyway on each key up, all command state is re-evaluate, and although each is relatively quick individually text processing was already putting us down (not only the text control shold do the layout, but we might need to move/relayout all graphics on the map as well...) because of that NM4 using WPF (& commands) is slower than NM3 were that there was no such unnecessary work on key up... is it a bit more clear now?!?
-
well, I'm not really working there anymore but the problem still haunt me!... the application could be found there: http://www.novamind.com/[^] All the button/controls on the ribbon are command source. There are lots of them. Most are enable all the time (although one could argue that invisible control should be disable, I'm not sure about what happen the ribbon control is a 3rd party, anyway some panel have a lot button). What really slow down the app is text imput. The main view is a legacy GDI+ control. The input text box in the view is a custom made text view (not a subclass of TextBoxBas, but of Control with custom text rendering via interop with Uniscribe, but with good perf, as it is able to paste 400k of text rich with the same perf as word). But in NM3 it was already limit, big map slowing the application perceply (as not only we should layout the text, but move all the map's graphics and the autolayouting algorithm is time consuming) Anyway on each key up, all command state is re-evaluate, and although each is relatively quick individually text processing was already putting us down (not only the text control shold do the layout, but we might need to move/relayout all graphics on the map as well...) because of that NM4 using WPF (& commands) is slower than NM3 were that there was no such unnecessary work on key up... is it a bit more clear now?!?
Lloyd, Thanks for your response. I've sent Josh an email. Let's see where he takes this. I'm interested in his opinion too.
Cheers, Karl
My Blog | Mole's Home Page | How To Create Screen Capture Videos For Your ArticlesJust a grain of sand on the worlds beaches.
-
Lloyd, Thanks for your response. I've sent Josh an email. Let's see where he takes this. I'm interested in his opinion too.
Cheers, Karl
My Blog | Mole's Home Page | How To Create Screen Capture Videos For Your ArticlesJust a grain of sand on the worlds beaches.
Karl...If I want to get involved with a thread, I'll do so on my own.
:josh: My WPF Blog[^] All of life is just a big rambling blog post.
-
Karl...If I want to get involved with a thread, I'll do so on my own.
:josh: My WPF Blog[^] All of life is just a big rambling blog post.
Sorry, :sigh:
Cheers, Karl
My Blog | Mole's Home Page | How To Create Screen Capture Videos For Your ArticlesJust a grain of sand on the worlds beaches.
-
Sorry, :sigh:
Cheers, Karl
My Blog | Mole's Home Page | How To Create Screen Capture Videos For Your ArticlesJust a grain of sand on the worlds beaches.
No problem, dude. I just sort of feel obligated to help out once someone mentions that they've asked me to reply to the thread. I'm pretty busy today and don't have time to help out. Damn day job! :-D
:josh: My WPF Blog[^] All of life is just a big rambling blog post.
-
No problem, dude. I just sort of feel obligated to help out once someone mentions that they've asked me to reply to the thread. I'm pretty busy today and don't have time to help out. Damn day job! :-D
:josh: My WPF Blog[^] All of life is just a big rambling blog post.
Maybe in the next couple of days. This question is beyond my skills to answer properly. Have a great day and don't forget, "who loves ya!" :cool:
Cheers, Karl
My Blog | Mole's Home Page | How To Create Screen Capture Videos For Your ArticlesJust a grain of sand on the worlds beaches.
-
Maybe in the next couple of days. This question is beyond my skills to answer properly. Have a great day and don't forget, "who loves ya!" :cool:
Cheers, Karl
My Blog | Mole's Home Page | How To Create Screen Capture Videos For Your ArticlesJust a grain of sand on the worlds beaches.
Karl Shifflett wrote:
Have a great day and don't forget, "who loves ya!"
Jesus? Satan? Captain Crunch?! :~
:josh: My WPF Blog[^] All of life is just a big rambling blog post.
-
Karl Shifflett wrote:
Have a great day and don't forget, "who loves ya!"
Jesus? Satan? Captain Crunch?! :~
:josh: My WPF Blog[^] All of life is just a big rambling blog post.
You forgot Santa and Mole.
Cheers, Karl
My Blog | Mole's Home Page | How To Create Screen Capture Videos For Your ArticlesJust a grain of sand on the worlds beaches.
-
You forgot Santa and Mole.
Cheers, Karl
My Blog | Mole's Home Page | How To Create Screen Capture Videos For Your ArticlesJust a grain of sand on the worlds beaches.
Good call! Also, Elvis might be on that list.
:josh: My WPF Blog[^] All of life is just a big rambling blog post.
-
Maybe in the next couple of days. This question is beyond my skills to answer properly. Have a great day and don't forget, "who loves ya!" :cool:
Cheers, Karl
My Blog | Mole's Home Page | How To Create Screen Capture Videos For Your ArticlesJust a grain of sand on the worlds beaches.
Karl Shifflett wrote:
don't forget, "who loves ya!"
That's easy. Paris Hilton, Pamela Anderson, Lindsey Lohan and the Josh Stalkerettes.
Deja View - the feeling that you've seen this post before.
-
With a bit of hack we were able to use command to return the current value of the target (as well as IsEnable), so we could nicely update color pickers, etc... on the control tool bar. Now the problem is we use lots of command in our application (about 300). And every time the user key one char in we do heavy processing as well (relayouting and repainting all visual information), and now that we have command, on top of the heavy text processing we've got all command updating (it's the behavior of the input manager to fire up an update of the command sources on key up). So... since we moved to command we suffer huge performance problem due to the above reason. Is there a way to disable command updating for a little while (while typing text) or. In fact, ideally, I would like to disable only some command updating (whereas text command should still update...) Any tip?
Lloyd, I've just written an article that you can read here. http://karlshifflett.wordpress.com/2008/02/24/wpf-sample-series-wpf-mvc-tabcontrol-mdi-and-commandbindings/[^] I think this will give you some insight into your issues.
Cheers, Karl
» CodeProject 2008 MVP My Blog | Mole's Home Page | How To Create Screen Capture Videos For Your ArticlesJust a grain of sand on the worlds beaches.
-
Lloyd, I've just written an article that you can read here. http://karlshifflett.wordpress.com/2008/02/24/wpf-sample-series-wpf-mvc-tabcontrol-mdi-and-commandbindings/[^] I think this will give you some insight into your issues.
Cheers, Karl
» CodeProject 2008 MVP My Blog | Mole's Home Page | How To Create Screen Capture Videos For Your ArticlesJust a grain of sand on the worlds beaches.
Indeed some interesting concept. As I said I'm not working there anymore.. But I was thinking to soon start a pet project were I could test all of that. Will give it a try some day. Thanks for taking some times to think about it hey!
-
Indeed some interesting concept. As I said I'm not working there anymore.. But I was thinking to soon start a pet project were I could test all of that. Will give it a try some day. Thanks for taking some times to think about it hey!
My pleasure to server. True be told, your issue played a major role in my REALLY digging into this. So... Thank you!:cool:
Cheers, Karl
» CodeProject 2008 MVP My Blog | Mole's Home Page | How To Create Screen Capture Videos For Your ArticlesJust a grain of sand on the worlds beaches.