Note that there are some explanatory texts on larger screens.

plurals
  1. POUI Dispatch Buffering?
    primarykey
    data
    text
    <p>I have a conundrum. I have "inherited" a very badly designed and very complex system which I am modernizing and rebuilding (with my team) piece-by-piece. The problem is that the current system is depended on by 200+ users, and they are having major issues with performance due to the (lack of) design. The most problematic issue at the moment is that a significant amount of work is beng placed on the UI thread, which leads to the GUI hanging until the thread is cleared amd message pumping can continue. Much of this work actually does need to be on the GUI thread, as it is updating a large number of fields in a grid due to other calculation results on other threads.</p> <p>The issue is this: I do not have the resource to dedicate to re-writing the threading model and underlying classes involved here, and the complexity of that work would introduce significant risk which is unacceptable to my client. </p> <p>I wanted to know if anyone had any suggestions on how to make the UI more performant, without interfering too much with the currnet threading model.</p> <p>My initial thought is that there might be some way to put a "buffer" in front of the actual invokes to the UI thread to make sure that the GUI does not get overloaded, or when it does to back off the dispatches to it.</p> <p>Any suggestions would be greatly appreciated. </p> <p>I know none of this is ideal, but we are where we are, and I really want to give my users a better experience prior to the year-long re-write's completion!</p> <p>Thanks!</p> <p><strong>Update #1</strong> This is a winforms app...sorry this wasnt clear at the outset. New code is WPF, but these modules are winforms.</p> <p><strong>Update #2</strong> I am thinking I may initially try changing most BeginInvoke calls to the UI thread to Invoke, introducing a serialization that will hopefully increase UI responsiveness. Any (non-obvious) downsides here, that anyone can forsee?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload