[Sugar-devel] [Dextrose] [PATCH v5 sugar] Pulsing icon delayed by 5 seconds or so SL#2080

Martin Dengler martin at martindengler.com
Thu Oct 28 22:55:07 EDT 2010

On Fri, Oct 29, 2010 at 11:05:45AM +1100, James Cameron wrote:
> On Thu, Oct 28, 2010 at 06:42:53PM +0100, Martin Dengler wrote:
> > http://www.martindengler.com/tmp/sl.o-2080/pulsingicon.py-stats-graph.png
> Nice.  A question on interpretation ... is the number of renderings
> consistent with the number of __pulse_cb callbacks?


> Looking at the bright green costly part of the graph, only the call
> counts:
> __pulse_cb 80x
> __update 84x
> {
> __set_stroke_color 40x (implies get_pulsing is false half the time)
> __set_fill_color 40x
> }
> _emit_paint_needed_icon_area 83x
> get_surface 199x
> render_cairo 90x
> I'm puzzled as to why (a) set_stroke_color is only being called 40
> times, yet (b) render_cairo is being called 90 times.  As if there is a
> doubling.

...because both set of 40x calls to __set_stroke_color and
__set_fill_color are causing _emit_paint_needed_icon_area to be
called[1,2], which call get_surface, which call render_cairo.  That
seems like doubling to me :).  Perhaps (OTTOMH) a flag in icon.py
_emit_paint_needed_icon_area which prevents it from actually emitting
if, well, it hasn't been paint()ed yet?

I'm also not sure why the icon is set as "sensitive", or whether "if
sensitive:"[3] is the right test.


1. http://cgit.sugarlabs.org/sugar-toolkit/mainline/tree/src/sugar/graphics/icon.py#n654
2. http://cgit.sugarlabs.org/sugar-toolkit/mainline/tree/src/sugar/graphics/icon.py#n685
3. http://cgit.sugarlabs.org/sugar-toolkit/mainline/tree/src/sugar/graphics/icon.py#n296
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: not available
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20101029/cc7cd2b3/attachment.pgp>

More information about the Sugar-devel mailing list