If, soon after next all those tips, you still have issues with RAM and CPU, then probably it’s mainly because your software is admittedly as well large, in addition to a Raspberry Pi isn't the suitable Software for that work. In this instance, you may want to evaluate alternative embedded https://www.mirobot.ai/