NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Adding a new StepType to the TypeUsageList is SLOW

Hi,

from code (C#) I'm creating a new new StepType, using the engine.NewStepType() method.
Before adding this StepType to my TypeUsageList, I'm changing some properties, like IconName, DefaultNameExpr, DescriptionExpr,...
And also the Name property is changed, but here is my problem: when doing this from Visual Studio (while in debug mode) it takes a long time to perform this. Running my app as a stand-alone (exe), and it goes (realtive) fast.

I've to add about 50 new StepTypes at once, doing this from Visual Studio takes about 30 seconds, from exe, about 3 seconds.

Is there something that I'm missing here ?


Using VS2010, C# 4.0, TS 2012 f1.

TIA

Franky

0 Kudos
Message 1 of 7
(2,959 Views)

Hello Franky,

 

I must say that this is a big difference between both.

 

But it does seem normal that the Debug Mode takes longer than the release mode.

 

I think you already know this, but to provide a quick recap:

- Debug Mode: executable will contain debug information which will make it slower.

- Release Mode: executable will not contain Debug information, which will by default cause better performance.

However, the major difference will be that many (if not most) of optimizations are turned on in Release Mode, but not in Debug Mode

 

On the msdn fora there are many threads about these differences:

http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/74db169a-e244-496e-ae97-8dfec18ff...

Kind Regards,
Thierry C - CLA, CTA - Staff R&D Engineer, RF Semiconductor Test - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 2 of 7
(2,934 Views)

Thanks Thierry for your reply.

 

I'm aware of a difference between the debug and release mode using VS,

but it's the first time that I'm using a COM object where the difference between debug/release is so striking !

 

Adding one Step Type to the Insertion Palette, from code (C#) is OK, but doing this for more then 20 steps is unworkable.

I've worked around this 'problem', but it still is an issue.

 

Regards,

 

Franky

0 Kudos
Message 3 of 7
(2,931 Views)

Hello Franky,

 

I was Out of Office the last week, so I can only now reply to you.

 

Can you share (an extract of) your code with me?

I'm interested in seeing how you exactly are adding these step type and how you are handling your references.

 

Thanks in advance!

Kind Regards,
Thierry C - CLA, CTA - Staff R&D Engineer, RF Semiconductor Test - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 4 of 7
(2,896 Views)

Hi,Could tell me how to "add the new step to Tpyeusagelist".

0 Kudos
Message 5 of 7
(2,732 Views)

Hi,Could tell me how to "add the new step to Tpyeusagelist".

0 Kudos
Message 6 of 7
(2,726 Views)

Have you tried the API TypeUsageList.InsertType()?

 

Also, as the original issue, perhaps a lot of output messages were being displayed in the visual studio debugger, slowing things down. Worth checking if someone is still having the performance issue.

 

-Doug

0 Kudos
Message 7 of 7
(2,552 Views)