[pyddr-devel] Performance, frame rate, and judging

Stephen Thorne stephen at thorne.id.au
Fri Jul 16 22:21:54 EDT 2004


On Fri, Jul 16, 2004 at 03:18:51PM -0400, Dean Brettle wrote:
<snip>
> I tried changing the code so that the display updates and pad-polling
> were done in separate threads, but Linux 
(python)
> wouldn't context switch regularly enough to fix the problem.  The only
> other option I see is to sprinkle pad polling strategically around the
> rest of the code.  Specifically, this would involve:
> 
> 1. Splitting the call to pygame.display.update() into multiple calls
> (with non-overlapping rectangles), and adding polling between the calls.
Thats a facinating idea. Have you tried it?

> 2. Adding polling inside some loops in player.py
We'd have to do some serious investigation to see how well this would
work.

> 3. Perhaps, adding some polling in arrows.py.
hmm. icky.

> Given that the HACKING file says "We should not sacrifice code clarity
> for speed except in extreme cases", would a patch which makes the above
> sorts of changes be considered for inclusion in a future release?
Depends on how clear you make it I guess.


Regards, 
Stephen Thorne.



More information about the pyddr-devel mailing list