Has anybody tried and succeeded at compiling Octoprint ? (Pypy or similar?) It seems to take a lot of cpu load. I might try it, but I have used very little Python.
My printer started generating excessive blobs after starting with Octoprint, and I don't know if it's a Pi bottleneck or my printer. Unfortuntely, the printer is not open source, so I wold have to replace the board to try things there.
Unless you are running a whole lot of plugins, OctoPrint shouldn't take a lot of cpu load. Python is not the problem here. With excessive blobbing while printing via USB, the serial protocol is a much more likely culprit, and the subject of many debates.
Pretty sure it's a printer bottleneck - as long as you don't get transmission errors. Increase the buffers in the firmware and/or use arc welder (either in your slice or in octoprint) to avoid these issues.
I have read (a long time ago) that it is possible to use PyPy to run OctoPrint, but I'm not sure if that's still relevant or not. It's definitely not a 'supported' way of doing it but that doesn't stop you from trying.
What sort of enclosure/case do you use? A heat sink does not do much good in the long run if there is no airflow. Fixing that throttling is a much more worthwhile endeavor than trying to work around it in software.
Have you used a plugin like Resource Monitor to track the temperatures and resource usage? Running something like htop on the command line would verify it is actually OctoPrint using all the CPU, not the webcam streaming for example. On an RPi 4 OctoPrint really shouldn't be causing it to throttle. Run in safe mode/without plugins as well.
If you used the aluminum case and we're still getting throttled, it's not a heat issue, it's a power issue. Without the system info bundle we can't really help. What power supply are you using for the pi? Guarantee it's being throttled due to low voltage. Have you taped the + pin of the USB to the printer?