[Sugar-devel] Testing the activity bundle of my activity before submitting it to ASLO.

laurent bernabe laurent.bernabe at gmail.com
Tue Oct 1 07:20:57 EDT 2013


Thanks for these patch : I've applied all and commited them.

I must admit I am yet far from good practises.


2013/10/1 James Cameron <quozl at laptop.org>

> On Tue, Oct 01, 2013 at 10:34:54AM +0200, laurent bernabe wrote:
> > But I don't think I can avoid repainting all screen at each frame,
> > as the balls move, so according to me, the performance gained this
> > way, in the case of my application, won't be that high. Maybe, I am
> > wrong.
>
> Yes, you're wrong.  ;-)
>
> The performance gain is of the order of six times.  Using top in 20
> second sample period, the CPU usage dropped from 30% to 5%, just for
> the game process.  There was a similar drop for the X process, which
> is the display handler.
>
> Please find attached five patches, which you can apply in order.
>
> The patches change the drawing functions to return sequences
> containing rectangles, which are then used by Pygame to update only
> the parts of the screen that need to be repainted.
>
> If the patches do not apply (git am), then perhaps you have made other
> changes, and I can rebase them.  Push your changes and let me know.
>
> These changes will make the activity less energy intensive.
>
> --
> James Cameron
> http://quozl.linux.org.au/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20131001/0b7dadbc/attachment.html>


More information about the Sugar-devel mailing list