[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] Limited FPS?



On this machine (Ubuntu 8.04, PyGame 1.7.1), pygame flip() is very slow.

A little demo I set-up and profiled showed that for 610 frames of animation - taking 21.8 seconds - pygame.flip() was taking over 9 seconds of that! Now I know that flip() has to wait for the monitor raster to get to the top of the screen, but my monitor is much more than 30 FPS! I can also understand it being a software blit, but the same number of fill() routines to clear the screen - which I have to assume moves the same amount of data - only takes 1.8s.

As I understand it PyGame is a thin layer over SDL, so is this something in SDL itself? Or am I doing something wrong?

-- Chris