NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Performance of context changes

Hi!

 

I am currently refactoring our process model which has quite a lot more functions than the original (sequential) model. For the SinglePass entry point up to now I had a lot of steps and not many sequence calls (apart from the callback calls) in the sequence. Now I refactored the logical functions of my model into external sequence files and into subsequences within these files. During the SinglePass execution (test program with MainSequence only containing one step) now there are about 50 sequence calls more than compared to the not refactured model (subsequences with just two or three steps are not uncommon). 50 sequence calls means that I have 100 context changes more which I know take some time in teststandSmiley Sad  However I am surprised that these 100 additional context changes seem take roughly about 310 miliseconds all together (difference of overall test execution time between old model and refactured model).

 

So my questions are:

- does anybody have experience if there is a difference in context change performance: subsequence is in the same file   vs.   subseqeunce is in another sequence file (it will take me half a day work to put these subsequences back into the model file)

- does anybody have experience in tuning teststand performance especially regarding context changes (special settings ...).

 

Up to now I have not yet tried for example to switch off result recording of the subsequences in the sequence properties - that'll be my next attempt.

 

Thanks so far

 

 weltaran

 

P.S. setup: TS2010; LV2010 SP1

 

0 Kudos
Message 1 of 2
(2,978 Views)

You should definitely turn off results for the sequences if you don't need them. You can do this at the sequence level (without having to change every step) by using the sequence properties dialog and checking the "Disable results for all steps" checkbox. You should also minimize parameter passing and pass parameters by reference rather than by value if possible. Also you should make sure you don't having tracing on when calling these sequences or that you are at least disabling tracing for these sequence calls.

 

Sequence calls do add some overhead, there is no way to avoid that completely, but if you disable result collection that should help a bit.

 

I don't think moving the sequences from one file to another will make much difference, but if it's easy to test, it might be worth a try.

 

Also, when you benchmark, make sure you throw out the data from the first UUT loop since teststand caches things so subsequent loops might be faster so you might be getting misleading results if you are only looking at the first loop or are including the first loop with the results from just a few more loops.

 

Hope this helps,

-Doug

0 Kudos
Message 2 of 2
(2,955 Views)