[cairo-bugs] [Bug 31589] Very high cpu usage of _cairo_bentley_ottmann_tessellate_polygon() in transmission-gtk

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Nov 15 18:27:19 PST 2010


M Joonas Pihlaja <jpihlaja at cc.helsinki.fi> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE

--- Comment #5 from M Joonas Pihlaja <jpihlaja at cc.helsinki.fi> 2010-11-15 18:27:17 PST ---
Thank you for the cairo trace of the application!  It confirms that the slow
part is stroking glyph outlines to create a drop-shadow effect around text.  A
faster way of creating shadows is to render the text once normally to a
temporary surface, and then masking and painting that surface to the target at
different offsets.

Re: the pseudo-code snippet linked to in comment #4, it's not a very good model
for this use case, as it is actually invoking the stroker to draw an edge
around a filled path.  It also uses cairo_push_group() to create the temporary
surface which, while usually a good thing and what you want to do since it
creates a "similar" surface optimised for the actual target surface, would not
be a good thing in this case as stroking onto that surface is exactly as slow
as onto the target surface.

As to already-rendered items continuing to consume CPU (after a surface flush),
the only reason why that would happen is if the application itself is actually
rerendering the items, say due to a new expose event from the window manager. 
There are currently no secret elves in cairo to burn your CPU just because they
can when you're not looking. :)

*** This bug has been marked as a duplicate of bug 28067 ***

Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the cairo-bugs mailing list