[cairo] Profiling the slowness of xlib surface

Carl Worth cworth at cworth.org
Thu Apr 20 11:35:39 PDT 2006


On Thu, 20 Apr 2006 20:11:47 +0200 (CEST), Timothée Lecomte wrote:
>
> Regarding my problem with seams, SATURATE is the best solution, but it
> implies using a termporary surface. Other solutions are not satisying, as
> far as I can tell (see previous threads about seams). So I guess I will to
> forget about xlib surfaces.

I think SATURATE is a good solution for what you are doing. I hope you
don't abandon xlib surfaces completely. Or rather, if you need to,
please do it consciously as an interim solution---that is continue to
make the xlib paths available so that the people working on fixing the
bugs, (both correctness and performance), can do so, and that you can
verify the improvement.

> Anyway is it normal to see so much time spent in these copy from main
> memory and video memory ?

Depends on what you mean by "normal". ;-)

There's "normal" as "sure, that's as braindead as cairo has always
been" and there's "normal" as "no sane library should ever behave like
that".

There are definitely performance bugs in cairo. As I've mentioned
before, a systematic treatment of performance and optimization just
hasn't happened for cairo yet, (though hot spots have been stamped out
here and there).

Personally, I'm currently focusing on improving the "print" surface
output quality. I'm in the wrap-it-up stages for that now, and after
that I plan to devote myself basically full-time to cairo performance
through the end of the year at least.

> Can this mean that each time I call cairo_fill(), for example, the server
> copies the pixmap to main memory to render through pixman and then copies
> it back to video memory ? In that case, that would make thousands of
> copies back and forth for the whole rendering. I hope I am wrong !

Or you can hope you are right... That is, the more brain-damaged the
performance bugs are, the easier they are to fix, and the more
improvement that results. ;-)

I do wish all of this stuff were done already and you would just be
pleased as punch with blistering performance from cairo, but I hope
you won't have to walk away displeased. There are lots of good things
coming I believe.

Happy hacking,

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


More information about the cairo mailing list