|
Smaller vtbls in RenderObject.
There are 101 different classes in the RenderObject class tree and
they share 150-250 virtual functions each. That scales to 60-200 KB
of vtbls (depending on architecture), which cost space in the
binary and time during startup since they need to be copied
to RAM and adjusted. In fact, some RenderObject vtbls are the
largest vtbls in Chrome.
There doesn't have to be anything wrong with any of this, but the
use of 60+ virtual isXXX functions which were the same for 100 out of
101 classes could easily be replaced by a single virtual function, saving 20-50 KB of the space mentioned above (again depending on architecture).
When the class is known, the isOfType functions will constant fold, just
like the isFoo methods.
clang x64 space info:
Total change: -47075 bytes
==========================
78 added, totalling +4731 bytes across 70 sources
142 removed, totalling -4008 bytes across 70 sources
397 grown, for a net change of +5064 bytes (296097 bytes before, 301161 bytes after) across 128 sources
115 shrunk, for a net change of -52862 bytes (209130 bytes before, 156268 bytes after) across 5 sources
gcc x64 space into:
Total change: -49078 bytes
==========================
141 added, totalling +19000 bytes across 90 sources
200 removed, totalling -21292 bytes across 90 sources
371 grown, for a net change of +17491 bytes (387125 bytes before, 404616 bytes after) across 164 sources
261 shrunk, for a net change of -64277 bytes (387358 bytes before, 323081 bytes after) across 98 sources
R=esprehn@chromium.org
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=183832
Total comments: 2
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+203 lines, -143 lines) |
Patch |
 |
M |
Source/core/rendering/RenderBR.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderButton.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderCounter.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderCounter.cpp
|
View
|
|
1 chunk |
+0 lines, -5 lines |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderDetailsMarker.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderEmbeddedObject.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderFieldset.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderFileUploadControl.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderFrame.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderFrameSet.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderFullScreen.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderFullScreen.cpp
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderGrid.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderHTMLCanvas.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderIFrame.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderImage.h
|
View
|
1
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderListBox.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderListItem.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderListMarker.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderMedia.h
|
View
|
1
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderMenuList.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderMeter.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderMultiColumnSet.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderObject.h
|
View
|
1
|
3 chunks |
+136 lines, -62 lines |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderProgress.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderQuote.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderRegion.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderReplica.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderRuby.h
|
View
|
1
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderRubyBase.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderRubyRun.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderRubyText.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderScrollbarPart.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderSlider.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderSliderThumb.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderSliderThumb.cpp
|
View
|
|
1 chunk |
+0 lines, -5 lines |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderTable.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderTableCaption.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderTableCell.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderTableCol.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderTableRow.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderTableSection.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderTextControl.h
|
View
|
1
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderTextControlMultiLine.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderTextControlSingleLine.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderVideo.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderView.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/svg/RenderSVGBlock.h
|
View
|
1
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
Source/core/rendering/svg/RenderSVGContainer.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/svg/RenderSVGForeignObject.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/svg/RenderSVGGradientStop.h
|
View
|
1
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
Source/core/rendering/svg/RenderSVGHiddenContainer.h
|
View
|
1
2
|
1 chunk |
+2 lines, -3 lines |
0 comments
|
Download
|
 |
M |
Source/core/rendering/svg/RenderSVGImage.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/svg/RenderSVGInline.h
|
View
|
1
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
Source/core/rendering/svg/RenderSVGInlineText.h
|
View
|
1
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
Source/core/rendering/svg/RenderSVGModelObject.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/svg/RenderSVGResourceContainer.h
|
View
|
1
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
Source/core/rendering/svg/RenderSVGResourceFilter.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/svg/RenderSVGResourceFilterPrimitive.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/svg/RenderSVGRoot.h
|
View
|
1
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
Source/core/rendering/svg/RenderSVGShape.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/svg/RenderSVGText.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/svg/RenderSVGTextPath.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/svg/RenderSVGTransformableContainer.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/svg/RenderSVGViewportContainer.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
Total messages: 17 (4 generated)
|