12-17-2009 08:34 AM
Hello everyone.
I've recently been trying to optimize my application as it can consume around 50% of the processor when it's running. One of the things my program does is display data on a series of gauges and other controls. I noticed that when there was no data (everything was zero), there was hardly any processor load. But when there was data, it sky rocketed.
I disabled things one by one and narrowed it down to my display loop. All this loop does is what for data on two queues and updates a cluster which is wired into a control for display. Disabling this loop while there was data caused the processor load to drop to almost nothing.
I am wondering if there is anything I can do to increase the performance of the gauge controls I use. I'm attaching a version of the loop that displays the gauges. If anyone has any information, that would be great!
Solved! Go to Solution.
12-17-2009 09:09 AM
3 thoughts
1) The guages are over-lapping so the redraw is complex. See this tag for over-lapping
2) Throotle back your updates. If those queue are returning data more often that 10-30 times a second, you are abusing the screen updates.
3) Use defer FP updates set true before the screen updates and false after the updates.
If non of the above helps there was an old thread where we used a Picture control to render the FP and avoided the over-lapping load but that is another bag of worms that we will reach into if we are still fishing latter.
Ben
12-17-2009 09:15 AM
This is a link to the Picture solution, see reply #16.
You may want to take a look at that thread since it covers the same topic and had rather cool looking GUI.
Ben
12-17-2009 10:02 AM
Thanks Ben! I had thought about overlapping. I moved everything so they didn't overlap, but it didn't work. Then, I used defer updates, but that made it worse. Finally, I weeded out which gauges were the problem and it turned out to be the RPM gauge which has it's label inside the gauge. Hiding this label did the trick, although I'm sure having everything overlap contributed the the problem.
Thanks again! I'll have a look into that FP picture render if I still want to have things overlap.