At 6:04 -0600 5/19/04, David A. Moore wrote: >>At 10:24 -0700 5/18/04, tim wen wrote: >>>another question: i've been using LV2 style globals to pass data between parallel >>>loops >>>and am wondering if a queue is a better way to go? > >>"Scott Hannahs" <[EMAIL PROTECTED]> wrote: >>Probably. If you are just passing data in one direction it can work well. With a >>LV2 style global you can build in internal processing and value manipulation to the >>global (ie intelligent global). > >If you're passing LARGE data, probably not, because LV2 style globals >are more efficient than queues i.e. you can avoid making extra copies >of the data.
Interesting. Does anyone know why a queue would make extra copies of data. I haven't tried pushing MBytes thru queues but there doesn't seem to be any inherent reason that a queue would make extra copies of the data. It should make a copy upon entering the data into the queue and the caller would release it. Upon dequeue the queue should release the memory and the receiving VI would copy it. (Note: these may not be actual copies but passing of pointers). This should be equivalent to a LV2 style global with a USR? The exact same memory allocation/deallocation should take place. I guess the real test is to make a couple of benchmarks and profile it. -Scott
