[cairo] Cairo 1.9.2 performance

cu cairouser at yahoo.com
Wed Jun 17 17:38:01 PDT 2009


To clarify a few things I forgot to mention.

Test was performed on Mac OS X (Intel) - this is one of our supported
architectures, and the easiest to test being "kind of a unix" :)
Configure for either version of Cairo runs from a script (i.e. the
options for both builds are exactly the same).

I ran application through profiler and found that vast majority of the
slowdown is attributable to text drawing. Specifically, profiler shows
enormous amount of time spent in cairo_show_text-> (a few functions ...
) FcFontSetMatch->FcCompare and sub-functions. I commented out most of
the text drawing, and without it the rest of the drawing is only
marginally slower (essentially the same as 1.8.6, the remaining slowdown
may be attributable to a few text output calls I missed). I don't see
the same code path show up in the call subtree of cairo_show_text in
1.8.6 (either it is not there or runs too fast for profiler to notice :) ).

Incidentally, I also found that default Makefiles as created by
configure for cairo do not include any optimization options (i.e.
CXXFLAGS contains -O3 but this does not propagate into the actual
compile options). Adding -O3 to compile options for 1.8.6 increased
cairo drawing speed by about 30% (260ms vs 450ms for the same dataset,
nice :) ). I don't know if this is by design - but perhaps it is worth
making -O3 the default build option.

M Joonas Pihlaja wrote:
> Hi cu,
>
> On Wed, 17 Jun 2009, cu wrote:
>
>   
>>  I decided to test our application (that currently uses Cairo 1.8.6)
>> with 1.9.2 snapshot. A quick test had shown that there is an enormous
>> performance degradation when using 1.9.2. Here are the self-test printout:
>>     
>
> [snip degradation in 1.9.2]
>
> That's very interesting!  Could you post some code which shows this 
> performance regression?  It seems there's a big hole in the 
> performance test suite if we're able to regress by 10x and not notice 
> it. :|  Alternatively, I guess running cairo-trace from 1.9.2 on your 
> app when it's running its self-test might work as well.
>
> Cheers,
>
> Joonas
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo
>   



More information about the cairo mailing list