[webkit-reviews] review cancelled: [Bug 7821] Pasting lots of plain text into Mail is slow : [Attachment 7130] patch

bugzilla-request-daemon at opendarwin.org bugzilla-request-daemon at opendarwin.org
Fri Mar 17 21:15:04 PST 2006


Justin Garcia <justin.garcia at apple.com> has cancelled Justin Garcia
<justin.garcia at apple.com>'s request for review:
Bug 7821: Pasting lots of plain text into Mail is slow
http://bugzilla.opendarwin.org/show_bug.cgi?id=7821

Attachment 7130: patch
http://bugzilla.opendarwin.org/attachment.cgi?id=7130&action=edit

------- Additional Comments from Justin Garcia <justin.garcia at apple.com>
Added an optimization to upstream() to bring the speedup to 3.9x.  When
upstream() is at a blockFlowOrTableElement offset 0, computing previous() for
the next iteration is expensive because calling previous() on any position of
the form [node, 0] requires calling nodeIndex, which is o(n).  We can avoid
calling previous() because we know that doing so will move us to a new block,
and we limit traversal to the block containing the original position.

Also removed some dead code from downstream().	It was handling the case where
downstream enters a new blockFlow, but we early return before entering a new
blockFlow.

Darin pointed out that ATSUI_pointToOffset is not our code, :-P, so we'll have
to decide what we want to do about the fact that it sometimes returns an offset
inside a "grapheme cluster".



More information about the webkit-reviews mailing list