05-05-2016 05:57 PM
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.
And this is the old.
Unfortunately, the code is too large to attach.
Solved! Go to Solution.
05-05-2016 06:08 PM
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.
05-05-2016 06:24 PM - edited 05-05-2016 06:26 PM
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.
05-10-2016 12:15 PM
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.