LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

does hiding indicators reduce thier memory footprint

We've got something of a resource hog of a program, with Gb of data floating around - we've never really payed any attention to memory usage before but now it's becoming an issue.
I read that extra indicators create copies of the data they display unless the VI is set to subroutine priority. Does the 'hide indicator" do the same job (broken keyboard means no question marks, darn it!)
thanks for the help
0 Kudos
Message 1 of 4
(3,146 Views)
Dan,

i created a small example showing that hiding an indicator has effect on memory usage. The example should be selfexplaining, so feel free to take a look.
Nevertheless, UI controls and indicators are not the only pitfall for waste of memory. One additional pitfall regarding controls/indicators is "Make current value default". Esp. with grapch/chart this can significantly increase memoryusage for the VI on the disc and therefore increase loadingtimes....

hope this helps,
Norbert B.
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 4
(3,139 Views)

thanks for the help. Looking at your example it seems as if the data itself is not copied into the indicators. The 'data' in the example was approx 320Mb and the displayed graph was approx 80Mb (labview seems to regard that 80Mb that the graph takes up as being data though on its memory usage thing in VI properties)

Presumably the indicators only hold a copy of the data they display - not the entire dataset, so they don't cost you very much memory unless they're displaying many cells/points

 

is that correct(questionmark)

0 Kudos
Message 3 of 4
(3,128 Views)


@Dan Acres wrote:

Presumably the indicators only hold a copy of the data they display - not the entire dataset, so they don't cost you very much memory unless they're displaying many cells/points


 


is that correct(questionmark)






Yes, that is correct. All indicators create copies of the data they display when the data is passed to its terminal/variable/property node. If you select not to display the control, it will not copy the data. Nevertheless (and therefore you had to close the VI) if you wrote some data to the indicator before, the dataspace is already allocated and setting the option "hide control" will not change the used memory.

The chart is a very special case. If you set the history length to a large value like i did, you will allocate the whole history if you start to write data to the chart. So you will waste lots of memory if you are only interested in few values....

hope this helps,
Norbert
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 4
(3,118 Views)