01-17-2013 10:19 AM
Hello,
If I call this piece of code (it is decoding frames from .mkv file) in a loop, the exe time is aprox. 15 ms.
If I call this piece of code in a loop with wait object, the execution time goes to 25 ms aprox. (no matter what the wait is of course).
If you have any clue why this could be happening let me know please.
01-17-2013 12:56 PM
At the first - set option "Run in any thread" instead of "Run in UI Thread" (if your DLL is thread-safe, of course)
Andrey,
01-17-2013 12:59 PM - edited 01-17-2013 01:01 PM
It isnt + it runs in subVI that is nonreentrant.
Funny is, that this happens in the standard basic one while loop. I stripped down the code to maximum and it still behaves this weird.
01-17-2013 01:22 PM
I would expect the overhead for the scheduler to evaluate if anything else is ready to run to be that high but that may be what you are running into. Even a Wait 0 will result in the scheduler evaluating if anything else is ready to run. Without the Wait the scheduler is not necessary invoked.