Jump to content
Software FX Community


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About deichler

  • Rank
  1. I uploaded a test solution here: http://www.polatrite.com/files/RealtimeGaugeTest.zip There's two configurable options at the top to show you this problem: int timeDelay, and bool useTimer. The problem I am having uses threads. One alternative is to use a timer, but timers bog down and don't gaurantee any kind of prompt execution, although I added that option to show you the comparison. The pariticular application I'm developing is central to a customer project and doesn't need to "play nice" with other applications on the system, as this will be the only major application running besides the OS.
  2. I tried the fix that you recommend here, and didn't notice any real improvement. When I first load up the form, it starts up the worker thread immediately. I notice something really interesting here, there are 8 gauges on the screen, 2 large ones in the center, 2 medium sized ones to the left and right of those, and then 4 smaller ones below those on either side. When I start up the form, only the four smaller gauges and the medium one on the right are painted. The other three gauges don't paint unless I actively drag the window around the screen. The thing that's odd about this is that I have a pretty good system - 2ghz core 2 duo, 2 gigs of ram - and other controls paint fine. I can add more and more controls to the screen, but it's always those three that don't seem to paint properly. If I disable a few of the working gauges, then the "broken" ones will paint. Any idea what is going on here?
  3. I have a winform with 8 radial gauges on it. When I load my form, I begin taking in data on a seperate worker thread, performing some engineering units conversion, and invoking it back on the GUI thread for updates. Every gauge is updated simultaneously with a single method performing a foreach loop: public void ChangeGaugeValue(RadialGauge[] pageList, double[] valList) { int counter = 0; foreach(RadialGauge i in pageList) { i.MainIndicator.Value = valList[counter]; counter += 1; } } With the thread set at 100ms intervals, I was experiencing a LOT of CPU usage, eventually causing some of the gauges to not update at all (as the processor was maxing and didn't have enough cycles to update all the gauges before going back to the higher priority worker thread). After doing some profiling with ANTS, I find that the majority of slowdown is actually in updating the Value property of the gauge. Am I doing something wrong? It seems like it is trying to Invalidate each gauge individually, instead of allowing me to set the properties to the new values, and then Invalidating the form. Any recommendations?
  • Create New...