01-23-2008 10:12 AM
01-24-2008
08:23 AM
- last edited on
05-02-2026
01:48 PM
by
Content Cleaner
Compared to C/C++ executables, LabVIEW executables take up a lot of memory.
However, 100MBytes for the application you mention seems like a bit much. The actual data should be stored in about the same amount of space in memory as it is on disk. However, if you don't really pay attention, you can make many copies of that data and end up using far more memory than you need to. How you use it and store it is important. Read through Managing Large Data Sets in LabVIEW for pointers on how to minimize those copies and speed performance.
I would recommend storing each of your data columns in a separate single-element queue. You can search for anything by dequeueing the array, doing the search on the array, then enqueueing the array again. This will not produce any copies and will then give you an index to fetch the other data from the other columns. To fetch data from a column, dequeue it, index the array, and enqueue the array again. You will make a single copy of the element you fetched. Since all your single element queues will be of type "queue of array of strings", you can create a couple of subVIs to handle the search and fetch functions. This also allows you to encapsulate the search and fetch functionality so you can improve it in the future, if necessary (e.g. currently use the LabVIEW search 1D array function but in the future use a hash table or binary search).
Let us know if you need more help.
01-24-2008 09:51 AM
01-25-2008
08:52 AM
- last edited on
05-02-2026
01:49 PM
by
Content Cleaner
If you can get to all your data from a local shift register, you won't be able to beat the performance of that with anything. However, keeping your data as a 2D array of text instead of several 1D arrays, one per column, will cause you searching issues. If you do unbundle/rebundle correctly, LabVIEW is smart enough to not make copies (the buffer viewer is your friend - use it often). The inplace structure is a lot more reliable. You don't have to think as much. I highly recommend it.
Whether or not LabVIEW keeps the extra data in memory depends on how the program was written. It may or may not. You can step through your program with the Windows task manager up and watch for memory allocation issues. If it does keep the memory, you can then try to eliminate the issues. There are some VI property flags you can set and primitives you can call to flush excess memory explicitly. I have never used them, but they were created for cases such as this.
You can find more information on the queue method (and a lot of other methods) in this thread - Reference Objects in LabVIEW - LabVIEW 8.5 Update.
Let me know if you need more information.