Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(482)

Issue 305883002: Switch arguments to const Length references for performance (Closed)

Created:
6 years, 6 months ago by pdr.
Modified:
6 years, 6 months ago
Reviewers:
ojan, esprehn, eseidel
CC:
blink-reviews, jamesr, blink-reviews-rendering, krit, zoltan1, eae+blinkwatch, leviw+renderwatch, jbroman, danakj, Rik, jchaffraix+rendering, rwlbuis, Stephen Chennney, rune+blink, alancutter (OOO until 2018)
Visibility:
Public.

Description

Switch arguments to const Length references for performance The Length destructor is nontrivial and every non-const Length argument adds an unnecessary branch from calling Length's destructor. This patch removes most of the non-const Length arguments which should lead to a small performance improvement. A few LengthSize, LengthPoint, and LengthBox arguments were also constref'ified for consistency. No new tests as there is no observable change in behavior. Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=175107

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+107 lines, -106 lines) Patch
M Source/core/rendering/RenderBox.h View 3 chunks +9 lines, -9 lines 0 comments Download
M Source/core/rendering/RenderBox.cpp View 7 chunks +9 lines, -9 lines 0 comments Download
M Source/core/rendering/RenderBoxModelObject.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderBoxModelObject.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/style/BasicShapes.h View 4 chunks +11 lines, -11 lines 0 comments Download
M Source/core/rendering/style/FillLayer.h View 3 chunks +4 lines, -4 lines 0 comments Download
M Source/core/rendering/style/RenderStyle.h View 15 chunks +52 lines, -52 lines 0 comments Download
M Source/core/rendering/style/RenderStyle.cpp View 5 chunks +6 lines, -5 lines 0 comments Download
M Source/platform/LengthBox.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/platform/LengthPoint.h View 2 chunks +5 lines, -5 lines 0 comments Download
M Source/platform/LengthSize.h View 2 chunks +5 lines, -5 lines 0 comments Download
M Source/platform/graphics/filters/FilterOperation.h View 2 chunks +3 lines, -3 lines 0 comments Download

Messages

Total messages: 22 (0 generated)
pdr.
6 years, 6 months ago (2014-05-29 06:08:30 UTC) #1
eseidel
lgtm OK. Should we be making ~Length() cheaper instead?
6 years, 6 months ago (2014-05-29 06:53:06 UTC) #2
Mike Lawther (Google)
On 2014/05/29 06:53:06, eseidel wrote: > lgtm > > OK. Should we be making ~Length() ...
6 years, 6 months ago (2014-05-29 08:13:36 UTC) #3
pdr.
On 2014/05/29 08:13:36, Mike Lawther (Google) wrote: > On 2014/05/29 06:53:06, eseidel wrote: > > ...
6 years, 6 months ago (2014-05-29 14:07:40 UTC) #4
pdr.
The CQ bit was checked by pdr@chromium.org
6 years, 6 months ago (2014-05-29 14:08:44 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pdr@chromium.org/305883002/1
6 years, 6 months ago (2014-05-29 14:09:27 UTC) #6
Mike Lawther (Google)
On 2014/05/29 14:07:40, pdr wrote: > On 2014/05/29 08:13:36, Mike Lawther (Google) wrote: > > ...
6 years, 6 months ago (2014-05-29 23:33:20 UTC) #7
ojan
There are ~70 Lengths on a RenderStyle and there are ~1:1 RenderStyles for each rendered ...
6 years, 6 months ago (2014-05-29 23:46:39 UTC) #8
eseidel
For context, how many DOM nodes does the HTML5 spec have? 300,000 sounds like a ...
6 years, 6 months ago (2014-05-30 00:01:32 UTC) #9
ojan
On 2014/05/30 00:01:32, eseidel wrote: > For context, how many DOM nodes does the HTML5 ...
6 years, 6 months ago (2014-05-30 00:06:38 UTC) #10
pdr.
On 2014/05/30 00:01:32, eseidel wrote: > For context, how many DOM nodes does the HTML5 ...
6 years, 6 months ago (2014-05-30 00:10:43 UTC) #11
eseidel
Donno if that will get text nodes... querySelectorAll('*') in gmail says 6800 nodes (on desktop).
6 years, 6 months ago (2014-05-30 00:50:55 UTC) #12
pdr.
On 2014/05/30 00:50:55, eseidel wrote: > Donno if that will get text nodes... > querySelectorAll('*') ...
6 years, 6 months ago (2014-05-30 01:35:42 UTC) #13
esprehn
On 2014/05/30 01:35:42, pdr wrote: > On 2014/05/30 00:50:55, eseidel wrote: > > Donno if ...
6 years, 6 months ago (2014-05-30 01:40:13 UTC) #14
eseidel
On 2014/05/30 01:35:42, pdr wrote: > On 2014/05/30 00:50:55, eseidel wrote: > > Donno if ...
6 years, 6 months ago (2014-05-30 01:47:24 UTC) #15
eseidel
Maybe the gmail count includes lots of parsed responseXML content? (Which there is some question ...
6 years, 6 months ago (2014-05-30 01:48:10 UTC) #16
pdr.
On 2014/05/30 01:47:24, eseidel wrote: > On 2014/05/30 01:35:42, pdr wrote: > > On 2014/05/30 ...
6 years, 6 months ago (2014-05-30 01:54:23 UTC) #17
pdr.
The CQ bit was unchecked by pdr@chromium.org
6 years, 6 months ago (2014-05-30 03:47:17 UTC) #18
pdr.
The CQ bit was checked by pdr@chromium.org
6 years, 6 months ago (2014-05-30 03:47:22 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pdr@chromium.org/305883002/1
6 years, 6 months ago (2014-05-30 03:48:17 UTC) #20
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_blink_rel on tryserver.blink ...
6 years, 6 months ago (2014-05-30 04:25:28 UTC) #21
commit-bot: I haz the power
6 years, 6 months ago (2014-05-30 05:19:39 UTC) #22
Message was sent while issue was closed.
Change committed as 175107

Powered by Google App Engine
This is Rietveld 408576698