Hey folks,
I'm working on optimizing a timing critical VI. This VI is the
producer in a producer consumer architecture. I'm trying to populate
a queue from file in a manner that is as efficient as possible. My
current plan of attack is:
- read block of data from file and populate array (pre-allocated).
- add array (always of the same size) to Queue with a max size defined
(e.g. 50 elements)
- This is in a while loop as is the standard producer consumer model.
To improve the performance I would like to ensure that there is no
dynamic memory allocation on the Queue's behalf. This is easily done,
from what I understand, if the data type in the queue is of the same
type (e.g. double, int). However, since the size of an array can vary
does this mean that any queue of arrays will always dynamically
allocate memory? Is there a way to ensure that the queue will always
use the same memory as in a circular queue?
Thanks,
Steve