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.
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:
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.
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!
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.