Awn

Code review comment for lp:~albyrock87/awn/awn-lucido

Revision history for this message
Alberto Aldegheri (albyrock87) wrote :

> Thanks for the style fixes. Here are my comments:
>
> 1) When using cairo methods, please use doubles directly, don't have the
> compiler do it ( cairo_scale (cr, 1, -1) => cairo_scale (cr, 1., -1.) )
> 2) You're using the expander detection quite often, move it to a function (at
> least the g_object_get() + gtk_container_get_children() )
> 3) Get rid of "g_list_free (i)", it could cause problems.
> 4) Since you introduced the helper surface, it'd be nice to integrate it
> properly into the background base class and have a "cached-drawing" property
> that will control whether the surface is used (default TRUE). (you'll get an
> extra point if you provide some statistics on how often is helps)
> 5) The stripe-width spin is put on a strange place in awn-settings, please try
> to rearrange it, so that it fits nicely.

I'm working on this.

For now I can tell you that (in lucido style), times are:
- use helper surface: ~0ms
- redraw surface: ~10ms

If you hover an icon and then run away with your mouse with bounce effect, you get about 20 redraw (during animation):
- using helper surface: ~1ms
- not using helper surface: 20*10 = 200ms

Time calculated with:
#include <time.h>

clock_t start, end;
double elapsed;

start = clock();
... /* Do the work. */
end = clock();
elapsed = ((double) (end - start)) / (((double)CLOCKS_PER_SEC) / 1000.0 );

« Back to merge proposal