PyGame slower on macOS than on Ubuntu or Raspbian
Pygame is based on the SDL library. It supports using various rendering backends, such as OpenGL
and metal
. According to this answer (and the comment), it seems that the metal
renderer might perform poorly on mac. Sadly, according to this issue, it seems that in most versions of pygame, it uses metal
as the SDL backend for mac, and provides no way to change that.
There is the pygame.OPENGL
flag you could pass to pygame.display.set_mode()
, but I'm not sure exactly how it would affect anything. It might be a good idea to play with the other flags listed here.
I'd recommend you to open an issue on pygame's official github repo with the necessary details. Also, as a workaround, you could clone pygame, change the default renderer on mac to OpenGL, compile, and see if it improves anything. You can use the issue I mentioned above to understand where you should start.