Garbage Collection

When your code executes, it could be instantiating variables or loading data into memory. Garbage collection is the process of identifying occupied memory that is no longer needed and can be freed up for other applications.

Static variables

A static variable is used to load data in a function that is loaded multiple times. When the data is the same across runs, you can save it in a static variable so that it won't be loaded multiple times.

Batches

If you need to process a heavy load, you can fetch the data for items one at a time instead of bulk loading the data. That will help manage the memory load on the system.

Topics