03-23-2006 10:59 AM
Thank you for the correction Wile-E.!
I appreciate the correction.
For those that have not seen it yet, please read my BLOG entry "he that loveth him chasteneth him "
that can be found in the LabVIEW Champions BLOG page found here.
http://forums.lavag.org/blog/champions/index.php?
Ben
03-23-2006 11:32 AM - edited 03-23-2006 11:32 AM
OK testing indicates that I stay with the LV2 version.
Here is a screen shot of my benchmarking.
Stay tuned!
Ben
Message Edited by Ben on 03-23-200611:33 AM
03-23-2006 12:27 PM - edited 03-23-2006 12:27 PM
Hi Ben, Hi all,
This is what I call a great and very interesting thread... Thanks Ben for
sharing your experience and observations.
What surprises me is that you chose to use a global (wich in my opinion is not
the appropriate tool for this) just because of speed conciderations, am I wrong
?
And now, you aparently decided to come back to FGV - but still because of speed
conciderations...
Is you application such time critical that you need to worry about a fistfull
of u-seconds ?
I am not sure about how works global variables but I assume that it is
duplicated many times in memory and so I am not surprised that problems occur
when you read it from many different parts of your app.
Only concidering the description of your "stop process" I would have
chosen a notifier or queue, I think an empty queue would be nice in terms of
"coding style", no ?
An queue queue read in all your loop, with a "preview queue" to read
and get the "timeout" output to know if the loop has to stop ; like
this you can put anything in your queue that doesn't matter since it will never
be read, just the information that "something" is in will be the stop
source.
Message Edité par TiTou le 03-23-2006 07:32 PM
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus
03-23-2006 01:03 PM
HI Titou,
See my replies inserted into your text.
--------------------------------------------------------------------------------------------------------
This is what I call a great and very interesting thread... Thanks Ben for sharing your experience and observations.
[Ben] Thank you and you are welcome!
What surprises me is that you chose to use a global (wich in my opinion is not the appropriate tool for this) just because of speed conciderations, am I wrong ?
[Ben] Yes sir! I am devloping a "crazy" application. We are up 30,000 "channels" with sample rates that vary from 1-1000 Hz.
And now, you aparently decided to come back to FGV - but still because of speed conciderations...
Is you application such time critical that you need to worry about a fistfull of u-seconds ?
[Ben] Yes Sir! When completed, this application will have to settle arguements about which part of the system failed to what they were supposed to do and when. Portions of the 30,000 channels will be coming from descrete systems that need to interact with each other as specified. In the final phases all of the contituents of the system I will be monitoring will be syncronized via IRIG-B and crystal clocks.
I am not sure about how works global variables but I assume that it is duplicated many times in memory and so I am not surprised that problems occur when you read it from many different parts of your app.
[Ben] Good observation, stay tuned.
Only concidering the description of your "stop process" I would have chosen a notifier or queue, I think an empty queue would be nice in terms of "coding style", no ?
An queue queue read in all your loop, with a "preview queue" to read and get the "timeout" output to know if the loop has to stop ; like this you can put anything in your queue that doesn't matter since it will never be read, just the information that "something" is in will be the stop source.In addition, with a Release Q with "destroy queue" to false in each loop, you are sure that the queue will be destroyed only after all your VIs have read it... isn't wonderful ?
[Ben] Yes that is a valid approach but again see my comments above on performance. The dynamic loading of components into this application makes that approach a little more cumbersome. The top level VI will at some time become "fixed" while I will have to develop new components at a future date. I can dictate that the "Global stop" wil always be there when I have to deploy future components.
BTW, there are my results... I am really surprised that global are so fast to read and Q so slow...
[Ben] Yes, a factor of 100 can not be ignored. That is why I broke my rule about "not using globals" just to pick up that performance delta. But like I said, stay tuned!
Ben
03-23-2006 02:15 PM
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus