[cairo-bugs] [Bug 73531] New: Extreme slowness drawing dashed lines
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Sun Jan 12 19:14:16 PST 2014
https://bugs.freedesktop.org/show_bug.cgi?id=73531
Priority: medium
Bug ID: 73531
Assignee: chris at chris-wilson.co.uk
Summary: Extreme slowness drawing dashed lines
QA Contact: cairo-bugs at cairographics.org
Severity: normal
Classification: Unclassified
OS: All
Reporter: terra at gnome.org
Hardware: Other
Status: NEW
Version: unspecified
Component: general
Product: cairo
First off, apologies for a bug report with precious few details. I am
hoping this rings a bell for some cairo developer.
The Gnumeric team has received a few reports of severe cpu usage when we
do our "walking ants" animation that marks a copied selection. I do not
see this on my Linux machine; I might see it with our win32 binary under
wine, but that's a whole lot of extra variables.
To see the walking ants animation in action, start Gnumeric, select a
large area, and press ctrl-c. Alternatively, watch
http://jeff.ecchi.ca/public/gnumeric-381011.webm
Here's what the animation code does:
1. We set a two-item dashed line style using cairo_set_dash.
2. We set a line width using cairo_set_line_width
3. We set one of the two ant colours.
4. We set a rectangle path using cairo_rectangle
5. We draw a line along that path using cairo_stroke_preserve.
[That draws half the ant pattern, say the black bits.]
6. We set the other ant colour.
7. We set the stipple with an offset of one "ant" length
8. We draw a line along that path using cairo_stroke.
[That draws half the ant pattern, say the wite bits.]
Repeat that every 150ms with the two colours swapped.
The actual code is at
https://git.gnome.org/browse/gnumeric/tree/src/item-cursor.c
near line 450.
Is there any reason why this should bring a modern machine to its knees?
Further random info:
Both my Linux and win32 cairo are 1.12.16.
One original bug report for this:
https://bugzilla.gnome.org/show_bug.cgi?id=381011 starting at comment 12.
--
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo-bugs/attachments/20140113/4eaaffff/attachment.html>
More information about the cairo-bugs
mailing list