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

Re: [pygame] Decrease in Performance



Bob Ippolito wrote:
On 2/20/07, Bruce Coram <brucecoram@xxxxxxxxxxx> wrote:
I'm reposting this - my first attempt appeared to get lost.  Being a
newbie I can not rule out incompetence!

What might the reason be for a significant drop in performance for
blitting objects to the screen using pygame versions 1.6 and 1.7, both
with Python 2.4.4.  We blit two surfaces, each approximately 900  x 900
pixels in size, consecutively to the screen.  Using pygame 1.6 this took
about 0.016 seconds but in pygame 1.7 it took about 0.024 seconds.  Can
anyone help?  I had thought that new versions improved performance not
degraded it.  The code is identical in both cases.


I think SDL may have changed its default driver from dx5 to windib, for compatibility reasons. Not all cards still support such an old API. I doubt it's anything in pygame.

-bob




Bob,

Many thanks for the reply. I'm not sure that I fully understand the answer. However here are some further questions, answers to which should clarify my thoughts.

pygame uses SDL for 2D pixel operations and other multimedia type tasks. A given version of pygame is therefore tied to or associated with a specific release of SDL. It would appear that as of SDL 1.2.10 windib is the default video driver. Can it be assumed that prior to 1.2.10 the default was dx5, and that pygame 1.7 uses 1.2.10 and pygame 1.6 uses an earlier release of SDL.

If my assumptions are correct then I am presumably stuck with windib and the associated performance hit - unless I use pygame 1.6.

Bruce