Summary: | Performance: Optimize Dromaeo/dom-query.html by caching NodeRareData on Document | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Kentaro Hara <haraken> | ||||||||
Component: | DOM | Assignee: | Kentaro Hara <haraken> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | darin, morrita, rniwa, webkit.review.bot | ||||||||
Priority: | P2 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Attachments: |
|
Description
Kentaro Hara
2012-06-27 03:58:41 PDT
Created attachment 149721 [details]
Patch
Created attachment 149856 [details]
Patch
Comment on attachment 149856 [details] Patch 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. Comment on attachment 149856 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=149856&action=review >> Source/WebCore/dom/Document.h:437 >> + void setRareData(NodeRareData*); > > Not sure if it's such a good idea to overload Node's rareData(). What is your suggestion? (I thought that in IRC you suggested to rename cachedRareData() to rareData().) >> Source/WebCore/dom/Node.cpp:500 >> + NodeRareData* data = static_cast<Document*>(this)->rareData(); > > We should probably declare a Document* local variable. Will fix. Created attachment 149865 [details]
patch for landing
Comment on attachment 149865 [details] patch for landing Clearing flags on attachment: 149865 Committed r121412: <http://trac.webkit.org/changeset/121412> |