<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><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#c1">Comment # 1</a>
on <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">bug 73531</a>
from <span class="vcard"><a class="email" href="mailto:psychon@znc.in" title="Uli Schlachter <psychon@znc.in>"> <span class="fn">Uli Schlachter</span></a>
</span></b>
<pre>I don't really understand the code, but here is what I think I found.
The 150ms timeout is implemented in item_cursor_realize() in item-cursor.c. For
items with ->style == GNM_ITEM_CURSOR_ANTED it does this:
ic->animation_timer = g_timeout_add (150, (GSourceFunc)
cb_item_cursor_animation, ic);
Looking at the callback function, we see that it just toggles ic->state and
calls goc_item_invalidate() on the item. I haven't actually found that
function's implementation, but debian code search gave me the following
(goc_item_invalidate(item) just calls goc_item_maybe_invalidate(item, FALSE);):
<a href="http://sources.debian.net/src/goffice/0.10.9-1/goffice/canvas/goc-item.c?hl=473#L451">http://sources.debian.net/src/goffice/0.10.9-1/goffice/canvas/goc-item.c?hl=473#L451</a>
This calculates the bounds of the items and invalidates that rectangle on the
canvas.
TL;DR: gnumeric redraws "basically all of its content" about 7 times per second
and then wonders that this is slow. (Or did I miss something?)
Re "this used to work fine for over a decade": The implementation a decade ago
was more intelligent (I guess instead of redrawing things, it just drew the ant
line ones and then used an XOR operator to "toggle the dashes/ants").</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>