[webkit-reviews] review denied: [Bug 103295] TextIterator unnecessarily converts 8 bit strings to 16 bits : [Attachment 176308] Updated Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Nov 27 12:24:39 PST 2012
Brent Fulgham <bfulgham at webkit.org> has denied Michael Saboff
<msaboff at apple.com>'s request for review:
Bug 103295: TextIterator unnecessarily converts 8 bit strings to 16 bits
https://bugs.webkit.org/show_bug.cgi?id=103295
Attachment 176308: Updated Patch
https://bugs.webkit.org/attachment.cgi?id=176308&action=review
------- Additional Comments from Brent Fulgham <bfulgham at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=176308&action=review
This looks like a huge improvement! However, I think it will be even better if
you don't copy the entire String each time you want to access a single
character :-)
r- for this reason (or please explain what I'm misunderstanding about your code
change).
> Source/WebCore/editing/TextIterator.cpp:472
> + return string()[startOffset() + index];
Currently this makes a copy of the string, then returns one character from it!
> Source/WebCore/editing/TextIterator.cpp:480
> + builder.append(string(), startOffset(), length());
Again, I think this is copying for no real reason...
> Source/WebCore/editing/TextIterator.h:110
> + String string() const { return m_text; }
Isn't this making a copy? I think your original "const String" should probably
have just been "const String&"
More information about the webkit-reviews
mailing list