Changeset 132995 in webkit
- Timestamp:
- Oct 31, 2012, 1:14:00 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 11 edited
-
ChangeLog (modified) (1 diff)
-
rendering/RenderBlock.h (modified) (1 diff)
-
rendering/RenderFrameSet.h (modified) (1 diff)
-
rendering/RenderInline.h (modified) (1 diff)
-
rendering/RenderMedia.h (modified) (1 diff)
-
rendering/RenderObject.h (modified) (1 diff)
-
rendering/RenderTableCol.h (modified) (1 diff)
-
rendering/RenderTableRow.h (modified) (1 diff)
-
rendering/RenderTableSection.h (modified) (1 diff)
-
rendering/svg/RenderSVGContainer.h (modified) (1 diff)
-
rendering/svg/RenderSVGRoot.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r132993 r132995 1 2012-10-31 Eric Seidel <[email protected]> 2 3 Add non-virtual firstChild/lastChild overrides to RenderBlock and RenderTableCol for a > 30% speedup on table from bug 100304 4 https://bugs.webkit.org/show_bug.cgi?id=100306 5 6 Reviewed by Abhishek Arya. 7 8 Presumably this is a speedup for other rendering tests as well. We use firstChild() all over 9 the rendering code w/o considering that it makes a virtual function call. 10 Originally I just fixed the one callsite which was showing up on the sample to 11 use children()->firstChild() directly. However after further thought, this 12 broader solution seemed the better way to go. The first patch was a 15% win for 13 this large table, this broader solution was a 30%!? win. 14 15 The elephant in the room for this table is that we're walking the whole table 16 for many nextColumn calls. But that I will solve in a later bug. 17 18 * rendering/RenderBlock.h: 19 (WebCore::RenderBlock::firstChild): 20 (WebCore::RenderBlock::lastChild): 21 (RenderBlock): 22 * rendering/RenderObject.h: 23 (RenderObject): 24 * rendering/RenderTableCol.h: 25 (WebCore::RenderTableCol::firstChild): 26 (WebCore::RenderTableCol::lastChild): 27 (RenderTableCol): 28 1 29 2012-10-31 Philippe Normand <[email protected]> 2 30 -
trunk/Source/WebCore/rendering/RenderBlock.h
r132112 r132995 87 87 virtual ~RenderBlock(); 88 88 89 RenderObject* firstChild() const { ASSERT(children() == virtualChildren()); return children()->firstChild(); } 90 RenderObject* lastChild() const { ASSERT(children() == virtualChildren()); return children()->lastChild(); } 91 89 92 const RenderObjectChildList* children() const { return &m_children; } 90 93 RenderObjectChildList* children() { return &m_children; } -
trunk/Source/WebCore/rendering/RenderFrameSet.h
r126859 r132995 58 58 RenderFrameSet(HTMLFrameSetElement*); 59 59 virtual ~RenderFrameSet(); 60 61 RenderObject* firstChild() const { ASSERT(children() == virtualChildren()); return children()->firstChild(); } 62 RenderObject* lastChild() const { ASSERT(children() == virtualChildren()); return children()->lastChild(); } 60 63 61 64 const RenderObjectChildList* children() const { return &m_children; } -
trunk/Source/WebCore/rendering/RenderInline.h
r132112 r132995 35 35 public: 36 36 explicit RenderInline(Node*); 37 38 RenderObject* firstChild() const { ASSERT(children() == virtualChildren()); return children()->firstChild(); } 39 RenderObject* lastChild() const { ASSERT(children() == virtualChildren()); return children()->lastChild(); } 37 40 38 41 virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = 0); -
trunk/Source/WebCore/rendering/RenderMedia.h
r115749 r132995 41 41 virtual ~RenderMedia(); 42 42 43 RenderObject* firstChild() const { ASSERT(children() == virtualChildren()); return children()->firstChild(); } 44 RenderObject* lastChild() const { ASSERT(children() == virtualChildren()); return children()->lastChild(); } 45 43 46 const RenderObjectChildList* children() const { return &m_children; } 44 47 RenderObjectChildList* children() { return &m_children; } -
trunk/Source/WebCore/rendering/RenderObject.h
r132503 r132995 179 179 RenderObject* nextSibling() const { return m_next; } 180 180 181 // FIXME: These should be renamed slowFirstChild, slowLastChild, etc. 182 // to discourage their use. The virtualChildren() call inside these 183 // can be slow for hot code paths. 184 // Currently, some subclasses like RenderBlock, override these NON-virtual 185 // functions to make these fast when we already have a more specific pointer type. 181 186 RenderObject* firstChild() const 182 187 { -
trunk/Source/WebCore/rendering/RenderTableCol.h
r132764 r132995 37 37 public: 38 38 explicit RenderTableCol(Node*); 39 40 RenderObject* firstChild() const { ASSERT(children() == virtualChildren()); return children()->firstChild(); } 41 RenderObject* lastChild() const { ASSERT(children() == virtualChildren()); return children()->lastChild(); } 39 42 40 43 const RenderObjectChildList* children() const { return &m_children; } -
trunk/Source/WebCore/rendering/RenderTableRow.h
r131050 r132995 36 36 public: 37 37 explicit RenderTableRow(Node*); 38 39 RenderObject* firstChild() const { ASSERT(children() == virtualChildren()); return children()->firstChild(); } 40 RenderObject* lastChild() const { ASSERT(children() == virtualChildren()); return children()->lastChild(); } 38 41 39 42 const RenderObjectChildList* children() const { return &m_children; } -
trunk/Source/WebCore/rendering/RenderTableSection.h
r132112 r132995 66 66 virtual ~RenderTableSection(); 67 67 68 RenderObject* firstChild() const { ASSERT(children() == virtualChildren()); return children()->firstChild(); } 69 RenderObject* lastChild() const { ASSERT(children() == virtualChildren()); return children()->lastChild(); } 70 68 71 const RenderObjectChildList* children() const { return &m_children; } 69 72 RenderObjectChildList* children() { return &m_children; } -
trunk/Source/WebCore/rendering/svg/RenderSVGContainer.h
r118608 r132995 36 36 explicit RenderSVGContainer(SVGStyledElement*); 37 37 virtual ~RenderSVGContainer(); 38 39 RenderObject* firstChild() const { ASSERT(children() == virtualChildren()); return children()->firstChild(); } 40 RenderObject* lastChild() const { ASSERT(children() == virtualChildren()); return children()->lastChild(); } 38 41 39 42 const RenderObjectChildList* children() const { return &m_children; } -
trunk/Source/WebCore/rendering/svg/RenderSVGRoot.h
r131231 r132995 44 44 45 45 virtual void computeIntrinsicRatioInformation(FloatSize& intrinsicSize, double& intrinsicRatio, bool& isPercentageIntrinsicSize) const; 46 47 RenderObject* firstChild() const { ASSERT(children() == virtualChildren()); return children()->firstChild(); } 48 RenderObject* lastChild() const { ASSERT(children() == virtualChildren()); return children()->lastChild(); } 49 46 50 const RenderObjectChildList* children() const { return &m_children; } 47 51 RenderObjectChildList* children() { return &m_children; }
Note:
See TracChangeset
for help on using the changeset viewer.