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

Re: [pygame] Pygame performance on Linux?



That's *really* slow.  What video card/driver/distribution do you use?
 I think something is wrong with your X setup.

You should be able to do much more than that.

On my really old P3 1 ghz laptop I get 112fps at 800x600 in a window.

import pygame
from pygame.locals import *
screen = pygame.display.set_mode((800, 600))
clock = pygame.time.Clock()
going = True
while going:
    events = pygame.event.get()
    for e in events:
        if e.type in [KEYDOWN, QUIT, MOUSEBUTTONDOWN]:
            going = False
    clock.tick()
    pygame.display.flip()
print clock.get_fps()


On 9/24/07, Greg Ewing <greg.ewing@xxxxxxxxxxxxxxxx> wrote:
> I have a Linux machine, with a CPU speed of supposedly
> 2.8GHz, on which pygame performance appears to be
> abysmal. Just doing display flips and nothing else,
> with an 800x6000 window, it can't get to 20fps. At
> 10fps, it's using about 75% CPU.
>
> Should I be able to expect better than this?
>
> Under the same conditions, my dual 1.25GHz PPC does
> 20fps using only about 20% of its total CPU.
>
> --
> Greg
>