[webkit-reviews] review granted: [Bug 90059] Performance: Optimize Dromaeo/dom-query.html by caching NodeRareData on Document : [Attachment 149856] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 27 19:49:08 PDT 2012


Ryosuke Niwa <rniwa at webkit.org> has granted Kentaro Hara
<haraken at chromium.org>'s request for review:
Bug 90059: Performance: Optimize Dromaeo/dom-query.html by caching NodeRareData
on Document
https://bugs.webkit.org/show_bug.cgi?id=90059

Attachment 149856: Patch
https://bugs.webkit.org/attachment.cgi?id=149856&action=review

------- Additional Comments from Ryosuke Niwa <rniwa at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=149856&action=review


This seems like a good optimization. Make sure we're getting the same benefit
for ElementRareData as things like document.images, document.all, etc... are
all hanging out off ElementRareData as well.

> Source/WebCore/dom/Document.h:437
> +    NodeRareData* rareData() const { return m_rareData; };
> +    void setRareData(NodeRareData*);

Not sure if it's such a good idea to overload Node's rareData().

> Source/WebCore/dom/Node.cpp:500
> +	   NodeRareData* data = static_cast<Document*>(this)->rareData();

We should probably declare a Document* local variable.


More information about the webkit-reviews mailing list