<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Extreme slowness drawing dashed lines"
href="https://bugs.freedesktop.org/show_bug.cgi?id=73531">73531</a>
</td>
</tr>
<tr>
<th>Assignee</th>
<td>chris@chris-wilson.co.uk
</td>
</tr>
<tr>
<th>Summary</th>
<td>Extreme slowness drawing dashed lines
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>cairo-bugs@cairographics.org
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Reporter</th>
<td>terra@gnome.org
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Component</th>
<td>general
</td>
</tr>
<tr>
<th>Product</th>
<td>cairo
</td>
</tr></table>
<p>
<div>
<pre>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
<a href="http://jeff.ecchi.ca/public/gnumeric-381011.webm">http://jeff.ecchi.ca/public/gnumeric-381011.webm</a>
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
<a href="https://git.gnome.org/browse/gnumeric/tree/src/item-cursor.c">https://git.gnome.org/browse/gnumeric/tree/src/item-cursor.c</a>
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:
<a href="https://bugzilla.gnome.org/show_bug.cgi?id=381011">https://bugzilla.gnome.org/show_bug.cgi?id=381011</a> starting at <a href="show_bug.cgi?id=73531#c12">comment 12</a>.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>