LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Fail gracefully with missing DLLs

Solved!
Go to solution

tst, do you know if providing a path to the Call Library Function Node will cause it to run slower on calls other than the first?

0 Kudos
Message 11 of 15
(493 Views)

@jmorris wrote:

tst, do you know if providing a path to the Call Library Function Node will cause it to run slower on calls other than the first?


I have no experience with it, so I wouldn't know, but Nathan is much more suitable to answer this than I am and his reasoning for the potential slowdown seems sound, although I would expect that a check for a file would have minimal impact. I'm also not sure whether such a check would be needed, because it's quite possible that once a DLL is loaded, it's guaranteed to stay around until explicitly unloaded, but I don't know if that's really the case.

 

Let's just say it's not something that I find to be of any concern.


___________________
Try to take over the world!
0 Kudos
Message 12 of 15
(489 Views)

Found the reference I wanted about the speed penalty for specifying a path on the block diagram versus configuring it in the call library setup.

http://forums.ni.com/t5/LabVIEW/Dr-Damien-s-Development-Call-Library-Function-Node-Calling/td-p/1117...

I think this answers your question; read through that whole thread for additional comments.

Message 13 of 15
(488 Views)

@jmorris wrote:

tst, do you know if providing a path to the Call Library Function Node will cause it to run slower on calls other than the first?


Yes, it will be somewhat slower. When you provide the library name in the dialog box LabVIEW loads the library when it loads the VI containing the Call Library Node and afterwards simply calls the function directly every time the node executes.

 

When you provide the library name/path dynamically it will at each  invocation check if the library path is still the same as with the previous call. Not sure how much optimization is there. In the worst case it is the time needed to verify that the entire path is still the same. Which is for the most part a memory compare. While that does take time, it is in the order of microseconds nowadays so it only will be an issue if you call functions that have itself a very short execution time AND you do that in loops many million times.

Rolf Kalbermatter
My Blog
Message 14 of 15
(469 Views)

Thank you very much Nathan and Rolf!  That's about a definitive answer as I could possibly hope for.  🙂  In the critical path of my application I have two DLL calls every 20ms, so I think I can absorb the extra microseconds without much concern if I go that route.

 

Thanks again!

 

-Joe

0 Kudos
Message 15 of 15
(462 Views)