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

Re: [pygame] Re: Fullscreen Performance



On Tuesday, Oct 7, 2003, at 15:24 America/New_York, Gerrit Holl wrote:

Pete Shinners wrote:
Gerrit Holl wrote:
My game, Brian, is not tile oriented, so this discussion won't
help me much. I don't know exactly what psyco is, but I will
have a look at it.
psyco is a sort of just-in-time compiler for python code. it
is very easy to make use of in your application (just pick
which functions you want the extra compiling for). it
usually makes a noticeable difference on games, but your
mileage will definitely vary.
Strangely, psyco halves speed for my game. I do not know what
is really going on, but adding 'import psyco; psyco.profile()'
to the top of my code slows down the run of a test level with
30 sprites constantly colliding with each other from 14 to 7 fps.
That's when you pick and choose what functions to use psyco with, and perhaps rewrite them such that they're psyco-optimizable (what it can and can't currently optimize is pretty clear in the documentation). psyco.profile does a lot of work and is not always what you want.

-bob