From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VI Memory Usage: Data very large

Solved!
Go to solution

I am working on restructuring an old project using more up to date structures. The old code used parallel loops to check if values of controls were changed. My new code uses event structures instead. Looking at the Memory Usage statistics on both, I have slightly reduced front panel and block diagram object memory, but I have over 10 MB more "Data" in the new code. I've checked all of my arrays and such, none of which are excessively large. Any ideas on what is using all of that memory? Thanks!

 

This is the new code's memory usage.

New Code Memory.png

 

And this is the old.

Old Code Memory.png

 

Unfortunately, the code is too large to attach.

0 Kudos
Message 1 of 4
(3,135 Views)

My guess is you have some constant folding happening, which turns a section of code into a constant.  And if the generated data would be a large array, then you will have a large array constant in there.  You can look for constant folding by turning it on in your options (I think it is a Block Diagram option).  When turned on, you will see "fuzzy wires" where the folding is happening.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 4
(3,129 Views)
Solution
Accepted by topic author nrpratt

How about a control or indicator that has a large amount of data saved as its default value?  That will eat up memory even if the control/indicator doesn't show all of that data at the moment.

 

Close your VI and reopen.  See if any of the controls contain data you are not expecting.  The data may look even bigger because controls will now contain the data it is displaying as well as the data stored as default as one of its properties.

Message 3 of 4
(3,122 Views)

None of my graphs or arrays were excessively large with default values. However, I still cleared all of the data from them and resaved it. It cut my file size on disk down from 13 MB to 257 kB! Thanks for the help.

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