[webkit-reviews] review denied: [Bug 85825] Shrink ElementAttributeData by factoring out Attr object count. : [Attachment 140584] Pretentious patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon May 7 14:23:12 PDT 2012
Antti Koivisto <koivisto at iki.fi> has denied Andreas Kling <kling at webkit.org>'s
request for review:
Bug 85825: Shrink ElementAttributeData by factoring out Attr object count.
https://bugs.webkit.org/show_bug.cgi?id=85825
Attachment 140584: Pretentious patch
https://bugs.webkit.org/attachment.cgi?id=140584&action=review
------- Additional Comments from Antti Koivisto <koivisto at iki.fi>
View in context: https://bugs.webkit.org/attachment.cgi?id=140584&action=review
I think the storage should be bit more optimized for size. Looks great
otherwise.
> Source/WebCore/dom/ElementAttributeData.cpp:36
> +typedef HashMap<QualifiedName, RefPtr<Attr> > AttrMap;
> +typedef HashMap<Element*, OwnPtr<AttrMap> > AttrMapMap;
I know Attrs are super rare and shouldn't really be used by anyone, but this
still seems overly bloaty. HashMaps have high fixed initial cost (64 slots by
default, lots of overhead). Since the name -> Attr map is basically always tiny
I think you should use Vector instead.
More information about the webkit-reviews
mailing list