[Webkit-unassigned] [Bug 121899] Optimize strings copies in srcset parser
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Sep 25 10:13:13 PDT 2013
https://bugs.webkit.org/show_bug.cgi?id=121899
Alexey Proskuryakov <ap at webkit.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #212551|review? |review-
Flag| |
--- Comment #2 from Alexey Proskuryakov <ap at webkit.org> 2013-09-25 10:12:14 PST ---
(From update of attachment 212551)
View in context: https://bugs.webkit.org/attachment.cgi?id=212551&action=review
I think that this is a useful thing to look into. r- for regressing src preformance though.
> Source/WebCore/html/parser/HTMLParserIdioms.cpp:393
> + image.imageURL = StringImpl::createWithoutCopying(srcsetAttribute.characters() + imageURLStart, imageURLEnd - imageURLStart);
I'm not really a fan of passing unsafe string across functions. Can we just record the start and length of the URL as indexes, and only create a string when needed?
> Source/WebCore/html/parser/HTMLParserIdioms.cpp:425
> + return String(imageCandidates.last().imageURL.characters(), imageCandidates.last().imageURL.length());
This adds an extra copy in the common case where we have an src and no srcset.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list