09-07-2005 06:25 PM
I assume by that you mean a property node created by CREATE PROPERTY NODE (which I would call implicitly linked because I don't have to link it).
I agree - I would think that no validity check would be required.
For the record, here are some test numbers. (LV 7.1, OS X, 2x2.0GHz G5)
Directly setting the value, thru the terminal: 0.52 uSec.
Setting the value thru a direct property node (created by CREATE PROPERTY NODE) 501 uSec.
Disconnecting that property node from control (it becomes "Boolean(strict)") and providing a reference INSIDE the loop: 8.77 uSec
Same as above, but reference is outside the loop: 438.6 uSec
Creating a property node from VI SERVER palette (it becomes "Bool (Strict)" - what's the difference?) and providing a reference INSIDE the loop: 14.2 uSec
Same, but reference is outside the loop: 423.8 uSec
I have no idea what the diff is between Bool and Boolean.
The fact that the direct property node is so bad, suggests the validity check is not the explanation.
It's obvious that I should avoid property nodes if at all possible when speed is an issue. But they server a useful purpose - I'm just not sure what the rules are to maximize their speed when I need to...
Blog for (mostly LabVIEW) programmers: Tips And Tricks
09-08-2005 01:49 AM
Which term we use is another debate (I called it explicit because LV [not us] knows that which control it is linked to, and it can only be connected to that control, but I can see how implicit would apply better), but we are talking about the same thing.
If there is a difference between Bool and Boolean (your numbers weren't far enough to determine that), then as another wild guess I would say that maybe one of them is an older one which was replaced, but using it requires a conversion to the newer one.
09-08-2005 07:36 AM
09-08-2005 07:39 AM
09-08-2005 06:30 PM
Here is something even stranger. If you place the reference outside the loop and NOT CONNECT IT TO ANYTHING. Link the property node directly to the control, it still takes a long time. If you bring it inside the loop, it cuts the time short (still not connected to anything)
This might mean that LabVIEW does some optimization when inside the loop that it doesn't do outside. Hmmmm.
Jack J.
Applications Engineer
NI
09-08-2005 08:02 PM - edited 09-08-2005 08:02 PM
Message Edited by Dynamik on 09-08-2005 08:08 PM
09-08-2005 08:40 PM
Blog for (mostly LabVIEW) programmers: Tips And Tricks
09-08-2005 08:50 PM
Blog for (mostly LabVIEW) programmers: Tips And Tricks
09-08-2005 08:57 PM
Well, I suppose that's possible. If you're going to limit the amount of optimization you do, then it makes sense to do it first on the stuff that gets done more often (stuff inside loops).
Although, that still doesn't explain everything. It must take a LONG time to do something if doing it ONCE affects the result by that much.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
09-08-2005 10:13 PM