If, just after following all Individuals recommendations, you still have problems with RAM and CPU, then maybe it’s for the reason that your software is de facto too hefty, along with a Raspberry Pi isn't the ideal Resource for the job. In this case, it is advisable to check out https://www.mirobot.ai/