[Sugar-devel] Testing the activity bundle of my activity before submitting it to ASLO.
James Cameron
quozl at laptop.org
Tue Oct 1 06:51:07 EDT 2013
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 --------------
A non-text attachment was scrubbed...
Name: 0001-add-test-harness.patch
Type: text/x-diff
Size: 862 bytes
Desc: not available
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20131001/10af454a/attachment-0005.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-use-fixed-slower-update-rate-in-menus-and-end-of-rou.patch
Type: text/x-diff
Size: 1660 bytes
Desc: not available
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20131001/10af454a/attachment-0006.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-remove-the-loading-screen-it-was-not-visible.patch
Type: text/x-diff
Size: 1048 bytes
Desc: not available
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20131001/10af454a/attachment-0007.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-return-sequence-of-dirty-rectangles-for-all-drawing-.patch
Type: text/x-diff
Size: 5589 bytes
Desc: not available
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20131001/10af454a/attachment-0008.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-optimise-drawing.patch
Type: text/x-diff
Size: 5189 bytes
Desc: not available
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20131001/10af454a/attachment-0009.patch>
More information about the Sugar-devel
mailing list