[cairo] Very slow performance
Carl Worth
cworth at cworth.org
Fri Jan 14 14:35:43 PST 2005
On At Wed, 05 Jan 2005 10:39:47 -0500, Chris wrote:
>
> I finally got around to testing these patches.
>
> On Sun, 2004-12-26 at 18:36 +0900, TOKUNAGA Hiroyuki wrote:
> > livsvg-cairo-not-create-surface.diff: Generated png seems correct, but
> > I'm not confident in this patch, I want someone's review. This patch
> > reduce test running time from about 15.5 seconds to about 3 seconds.
>
> This on the other hand, made a massive difference. I went from 10
> second renders to 1 second. The difference between unusable and
> usable.
Indeed. Thanks so much for finding this, Hiroyuki.
> Has anyone looked at this to see if it might break something? My test
> renders worked fine. Was there a good reason for setting
> state->child_surface?
No, there wasn't a good reason for setting it, (just mindlessly
copying everything in the struct). When I first saw the fix, I planned
to rewrite it to eliminate the state->child_surface field
altogether. But I realized I wasn't going to get to that as quickly,
so this is now committed as is.
Besides, an even cleaner solution would be to add support for implicit
sub-surfaces, (groups), directly into cairo. This code is a perfect
use case for them. That would also completely eliminate the need for
state->child_surface.
It's nice to now see the system time down near zero where it should
be:
$ time svg2png centi_unfinished.svg cent_unfinished.png
real 0m5.366s
user 0m5.276s
sys 0m0.065s
Looks like we're actually measuring drawing now. So a bit more
profiling at this point could tell us what we should optimize first.
-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/20050114/b4e08350/attachment.pgp
More information about the cairo
mailing list