If, right after following all Individuals suggestions, you still have issues with RAM and CPU, then possibly it’s mainly because your application is basically too hefty, plus a Raspberry Pi is not the ideal Software with the job. In such a case, you might want to have a look at https://www.mirobot.ai/