[webkit-reviews] review granted: [Bug 121499] Shrink SVGElement::cssPropertyIdForSVGAttributeName and cssPropertyToTypeMap : [Attachment 211917] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Sep 17 09:59:12 PDT 2013
Andreas Kling <akling at apple.com> has granted Darin Adler <darin at apple.com>'s
request for review:
Bug 121499: Shrink SVGElement::cssPropertyIdForSVGAttributeName and
cssPropertyToTypeMap
https://bugs.webkit.org/show_bug.cgi?id=121499
Attachment 211917: Patch
https://bugs.webkit.org/attachment.cgi?id=211917&action=review
------- Additional Comments from Andreas Kling <akling at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=211917&action=review
r=me
> Source/WebCore/svg/SVGElement.cpp:149
> + for (unsigned i = 0; i < WTF_ARRAY_LENGTH(attributeNames); ++i) {
> + const AtomicString& localName = attributeNames[i]->localName();
> + map.add(localName.impl(), cssPropertyID(localName));
> + }
Can we reserve the necessary map capacity up front to avoid rehashing somehow?
> Source/WebCore/svg/SVGElement.cpp:222
> + for (unsigned i = 0; i < WTF_ARRAY_LENGTH(table); ++i)
> + map.add(table[i].attributeName.impl(), table[i].type);
Same question.
More information about the webkit-reviews
mailing list