[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [pygame] why so slow??
> 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
> ____________________________________
> pygame mailing list
> pygame-users@seul.org
> http://pygame.seul.org
>
...
def main():
global screen
pygame.init()
screen = pygame.display.set_mode(config['mainframe']['size'])
pygame.display.set_caption("aaaa")
pygame.mouse.set_visible(1)
profile.run('main()')
...
3 function calls in 4.729 CPU seconds
Ordered by: standard name
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 4.725 4.725 <string>:1(?)
1 4.725 4.725 4.725 4.725 GUItest.py:24(main)
1 0.004 0.004 4.729 4.729 profile:0(main())
0 0.000 0.000 profile:0(profiler)
???why?? It seem my processor goes very slow...I've 1600 mhz...???
____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org