I really do believe your premise isn't accurate. (External) Function code has loaded once on it's first call, then it stays in memory and isn't reloaded again. It may get paged out, but this is out of your hands. If you are currently running out of memory, there is most likely a different problem. Processing tick-by-tick is a waste of CPU unless it is necessary, but this is a separate problem.