05-11-2012 05:15 PM
I'm using IntensityGraph from Measurement Studio 2010, it is working fine. The problem is, it is taking a huge amount of CPU (like 35-40% of my PC's total CPU) while active. Most of the time is spent in the Plot(double[,]) function. Is there any way to improve the performance, e.g. override or re-implement some part of the component? Any other potential fix or workaround from NI? Thanks.
05-11-2012 07:15 PM
On closer inspection, it appears that the main culprit is in the painting, not plotting. If I move another window in front of the intensity graph window, or if I override the IntensityGraph.OnPaint() method and replace it with empty code, CPU loading goes back down. What can be done to make this OnPaint() method less of a CPU hog? Thanks.
05-14-2012 10:18 AM
jble,
It sounds like OnPaint() might be called more than necessary in your case. There could be a variety of reasons why that is happening. Do you have any other UI tools overlapping with part of the Intensity Graph? This is a common problem that is often overlooked. Overlapping objects cause more draw operations than would otherwise be performed.
Cheers,