Some notes on optimization work in progress (was: Re: [cairo] WinXp benchmarks)

Carl Worth cworth at cworth.org
Thu Mar 3 13:32:39 PST 2005


On 03 Mar 2005 21:02:44 +0100, Soeren Sandmann wrote:
> > 	samples  %        app name                 symbol name
> > 	1371     31.9879  libpixman.so.1.0.0       fbRasterizeEdges8
> > 	788      18.3854  libcairo.so.1.0.0        _cairo_pattern_calc_color_at_pixel
> > 	481      11.2226  libpixman.so.1.0.0       IcCombineOverU
> 
> With the sysprof profiler, which does do callgraph-based sums, I get
> these results:
> 
>    _cairo_pattern_calc_color_at_pixel()            36.86 %
>    pixman_composite()                              22.90 %
>            (with 17.16% of those in pixman_CompositeGeneral)
>    fbRasterizeTrapezoid()                          16.17 %
> 
> The percentages are totals, ie. they include children of the
> functions. The rasterization times reported by the two profilers are
> quite different.

Soeren, thanks for providing these numbers.

Since the oprofile numbers are not totals, some of the numbers make
sense, (eg. oprofile's 11% from IcCombineOverU can believably be part
of the 23% total of pixman_composite). But other things don't make
sense, (eg. summing can't make the 32% from fbRasterizeEdges8 go down
to 16%).

Although it is possible I ran against a modified rasterizer with
overhead necessary to allow optimizations, (but without the
optimizations in place yet).

I'll try running sysprof and oprofile both on my machine and see if
the results make sense.

One thing I do know, is that the work in libpixman is totaling about
50%. I'm about to commit a fix to libpixman to make it clip the
intermediate surface used to construct the mask, (into which the
trapezoids are rasterized), by the bounds of the destination
surface. With this patch in place, rendering gearflowers to a region
outside the bounds of the target is almost exactly twice as fast.

I'll generate a similar fix for the fb code in the X server.

And it may be that the gradient code is also simply missing something
like this.

-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050303/abfc2ca3/attachment.pgp


More information about the cairo mailing list