Honestly Iā€™d just pay for more memory. Running out means you need more, but not necessarily that youā€™re doing “too much” or architected wrong. Adding more is the simplest, most predictable, and considering your time, almost certainly the cheapest option.