Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Performance problem with IntensityGraph Plot()

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.

0 Kudos
Message 1 of 3
(4,360 Views)

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.

0 Kudos
Message 2 of 3
(4,357 Views)

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,

KyleP
Applications Engineer
National Instruments
0 Kudos
Message 3 of 3
(4,351 Views)