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

Re: [pygame] Pygame performance on Linux?



I get 140 fps on a P4 1700 with Rene's script. I have an ATI Radeon 8500 with hardware acceleration. To know if you get hardware acceleration just run "glxinfo" command and see if you get somewhere "direct rendering: Yes"

enrike



René Dudfield(e)k dio:
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