[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] why so slow??



mrfaro@libero.it wrote:
import profile, pygame
def main():
pygame.init()
screen = pygame.display.set_mode((310,120))
pygame.display.set_caption("aaaa")
pygame.mouse.set_visible(1)
profile.run("main()")

3 function calls in 0.268 CPU seconds
it was quite fast here
if you are looking to speed this up on windows, you can get faster init() time by using the 'windib' display for SDL instead of 'directx'. when SDL initializes directx it enumerates all the available display modes, for some reason this takes a noticeable amount of time. every other platform initializes immediately.

heh, history note, my first patch to SDL was to cut the directx init time by half (since it enumerated twice). in any event glad to hear there was something besides pygame/sdl causing the trouble :]




____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org