0

In my current project i have a CPU intensive 3D chart that needs to be updated in real time.

I have been using background workers for the project and using those, i do all the processing in the background. Receiving of Message, Interpretation of message, finally pass data set to gui.

The updating GUI step takes 20-50ms depending on the amount of data. The problem with this is that my propertygrid on the side, which is there to change settings doesnt stay responsive while the 3D chart is being updated. By inserting a delay between the update cycles i have managed to bypass the issue, but its not a permanent solution.

Is there anyway to have a separate thread that specifically updates and interacts with only one control rather than having the main thread clogged by the amount of data being passed to all the controls.

Or is there a way to set a priority for certain controls within the GUI so they are updated in that order, in other words the property grid is never blocked regardless of the data being sent to the other controls in the main thread.

  • 2
    Which UI framework? – Sebastian Negraszus Jun 8 '15 at 9:57
  • language is c# and UI is winforms – r wank Jun 8 '15 at 9:59
  • If the gui update step takes 20-50ms, then everything should be fine, nothing should be unresponsive. So, this does not make sense, please explain in greater detail what the problem is. Also, if you aspire to post questions here and have them answered, consider switching to a better user name. – Mike Nakis Jun 8 '15 at 10:08
  • 50ms is not enough for a property grid to come out of the drop down after you have selected an entry. thats why i had to add the delay in the first place. – r wank Jun 8 '15 at 10:12
  • 1
    It may be worthwhile to change the way you render the data to using direct3D, then you just need to change the buffer content in the mainthread callback. – ratchet freak Jun 8 '15 at 10:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.