Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Changing visibility of annotations is very slow

I am noticing a problem when changing the visibility of an XYPointAnnotation in the it seems very slow. The situation I have is a graph with 150 xy point annotations on it, and I want to change say 100 of these to become invisible (or visible), changing each one seems to take >100ms just to make the .Visible= call.

Are there any other ways of achieving this or improving things as this seems a long time ?

Using

VS2005 SP1, c#, Measurement Studio version 8.1.20.377 (from nationalinstruments.ui.windowsforms dll properties)

Thanks

Paul
0 Kudos
Message 1 of 7
(3,758 Views)

Hi Paul,

I believe there are some known performance issues with this. See the two links below. I will check with the US to see what the progress is with investigating this issue.

http://forums.ni.com/ni/board/message?board.id=232&message.id=3828&requireLogin=False

http://forums.ni.com/ni/board/message?board.id=232&message.id=3358&requireLogin=False

Sarah

Applications Engineer | National Instruments | UK & Ireland
0 Kudos
Message 2 of 7
(3,736 Views)

Hi Paul,

I've checked with the US and this is still a known issue. Have you tried drawing the annotation yourself using GDI+ as in the example on the forum linked above?

Sarah

Applications Engineer | National Instruments | UK & Ireland
0 Kudos
Message 3 of 7
(3,709 Views)
I haven't tried drawing them myself yet, it didn't seem particulary slow doing the initial draw, only when changing the visible state at a later stage in the application.

Paul
0 Kudos
Message 4 of 7
(3,702 Views)
Could you check the ImmediateUpdates property of the graph to make sure it is set to false? Setting it to true could be one reason for the slow update of the control.
Abhishek Ghuwalewala | Measurement Studio | National Instruments
0 Kudos
Message 5 of 7
(3,698 Views)
It is set to false, something I've just noticed is that running out of visual studio it's quite a bit faster but there is still a noticable delay on the dataset I'm currently using (60 annotations) :

Debug within visual studio
63ms per annotation (~4 seconds for whole set)

Release + Debug Out of visual studio
16ms per annotation (~1 second for whole set)

So I guess it's not such an issue at the moment as the end users won't see it running inside of VS, however the delay is still noticable.

Paul
0 Kudos
Message 6 of 7
(3,689 Views)
Running the debugger inside Visual Studio is bound to degrade the performance of an application. The Visual Studio debugger is processing symbol tables and watching your code for breakpoints, etc and not letting the application run at its full potential. The performance of an application cannot be suitably gauged when running in the debugger. In fact, Debug builds of an application should never be used to monitor performance. A release build (devoid of debugging symbols) is best for tracking performance problems.
Abhishek Ghuwalewala | Measurement Studio | National Instruments
0 Kudos
Message 7 of 7
(3,680 Views)