How to avoid copy of string variables, mappings and dyn arrays at function call?
On passing a variable to a function in CTRL (including UI), the value of the variable will copied. On using large variables (e.g. big strings, arrays or mappings), it is a good idea to use a reference variable. That would avoid the overhead of copying the variable, saves performance and reduce the memory consumption of the manager.
Example for using a reference:
myFunction(dyn_dyn_anytype &ddaMuchData)
To sign that the variable will only be used for reading and the function is not modifying its value, the reference variable can declared as const:
myFunction(const dyn_dyn_anytype &ddaMuchData)