Comment 39 for bug 655024

Revision history for this message
veldt (veldt) wrote :

Hmm, pango might be involved in this too (rendering lots of curvy text via cairo? guessing) This response from cairo on our current topic (mentioning pango_cairo_layout_path(), and the high CPU usage in transmission-gtk being in _cairo_bentley_ottmann_tessellate_polygon()) suggests rendering to a temporary surface as a workaround, thanks M Joonas Pihlaja:

https://bugs.freedesktop.org/show_bug.cgi?id=31589#c1

-- excerpt --
From the code path snippet provided, I expect what's happening is that the
outline path involves lots of curves, and unfortunately those cannot be
fastpathed to bypass the stroker's call to tessellate the stroked outline when
using the xlib surface.

In any case, the image backend uses a different rasterisation method in 1.10 so
the regression doesn't occur as much, so a possible workaround might be to use
a temporary image surface to render the strokes.
-- end excerpt --

The cairo-perf-trace at the end of https://bugs.launchpad.net/ubuntu/+source/transmission/+bug/655024/comments/31 seems to confirm that. It looks like rendering to "image" rather than directly to xlib or xcb is about 7.62 times faster.