Memory use and objects

I’m working on this preset for the PCM-70 and I’m hitting up against a memory limit.

To implement it, I had to make some decisions about using more static pages (versus less pages, but reassigning all kinds of names/limits per control) and also using a number of arrays of values (either factory program/parameter names or lookup tables filled with values that cannot be dynamically calculated).

There’s also a lot of LUA code (about 1100 lines of code/comments/blank lines).

I need to reclaim some memory to be able to finish this preset.

So, my question is – does a page of controls have a certain amount of space that it takes up or is that dynamic based on the type of control, labeling, lists, etc?

If a bunch of controls use a list of text strings, is it more efficient to create a static list in LUA and then index into that or to create a list control and copy it? (I believe that if I create a single list once on a control and then copy that control, the list appears only once in the EPR file)

If I try to dynamically adjust the controls on a page, currently (beta 3.1.7) the min/max changes seem to cause a lot of problems. I have not tried it yet in conjunction with the window paint on/off, but I will.
However, is the space saved by reducing the number of pages used back up with the LUA code needed to do the reconfiguring?

Just trying to determine where my time would be best spent to get some space back

1 Like