LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Memory Issue - Handling array of strings in table

Hello Everyone,
 
       I find trouble in handling a table of strings. The number of rows could vary from 5000 - 10000 whereas the number of columns will be 70. So when I load the string data and view it, labview is consuming much of the memory. Also, I will be performing operations like sorting on this data and will be displaying again. Is there are any alternative or any efficient method for handling this situation?
 
Thanks,
Vasanth.
Ya Ya
0 Kudos
Message 1 of 6
(3,263 Views)
Hi Vasanth,

first action should be: don't use an indicator to show the whole string data. Each indicator holds its own copy of the data! Maybe you can select just a portion of the data to present it to the user...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 6
(3,262 Views)
Hi GerdW,
 
      Thanks for your suggestion. But, fortunately, I did this already :-). The problem is, when I have to sort the data and so, anyway, I have to take the whole data only. Also, when the user need to select a set of rows for, say,  deleting, it would not be possible if we just put up only a subset of data for display. Am I clear?
 
-Vasanth.
Ya Ya
0 Kudos
Message 3 of 6
(3,254 Views)
Hi Vasanth,

keep in mind you have 70*5,000(10,000)=350,000(700,000) strings! You have to multiply this number by the length of the strings (and to add some overhead like storing string length for each string...) to get the amount of needed memory .
Sorting this amount of data takes time and requires additional data copies (you probably sort row by row?). And you easily create data copies in memory due to data processing...

Why not use a subset for display? You can make your own scroll bar. This way the user selects the displayed selection of data.
The user scrolls through the data. When he selects an item the index is put into a indicator (using event structure). Then the user can press a button (or select from a ring) to start an action like 'delete'.
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 6
(3,249 Views)
Hi GerdW,
 
     I think your suggestion will work out. I have implemented what you have suggested. I will test it and see its performance and will update you the efficiency.
 
Thanks,
Vasanth.
Ya Ya
0 Kudos
Message 5 of 6
(3,224 Views)

                When I load and display a huge dataset, the memory usage goes up in a huge extent. But when I switch back to a smaller dataset, this usage does not drop down. Any suggestions to release this memory? I am not using any subVIs but displaying the data directly in the main vi.

-Vasanth.

Ya Ya
0 Kudos
Message 6 of 6
(3,167 Views)