[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
>
>
>
> Looks like the most expensive part might be the import pygame:
>
> With your code:
> 3 function calls in 0.688 CPU seconds
>
>
> Or like this (and after restarting the interpreter):
>
> import profile
> def main():
> import pygame
> pygame.init()
> screen = pygame.display.set_mode((310,120))
> pygame.display.set_caption("aaaa")
> pygame.mouse.set_visible(1)
> profile.run("main()")
>
>
> 15 function calls in 2.000 CPU seconds
>
>
> Still not the 3+ seconds reported by the OP (even on my
> old 486) so I wonder if maybe it is a problem w/ the
> video driver and that particular mode....
>
>
>
> _________________________________________________________________
> MSN 8 with e-mail virus protection service: 2 months FREE*
> http://join.msn.com/?page=features/virus
>
> ____________________________________
> pygame mailing list
> pygame-users@seul.org
> http://pygame.seul.org
>
i find the problem: it was a spyware installed by i-mesh...i removed
it with ad_aware and now my PC works well...
tnx, sorry, I thought it was a python problem...
____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org