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

Issue 260073005: Do not cache the result of RenderStyle::computedLineHeight() (Closed)

Created:
6 years, 7 months ago by rhogan
Modified:
6 years, 6 months ago
CC:
bemjb+rendering_chromium.org, blink-reviews, chrishtr, dsinclair, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, ojan, pdr., rune+blink, zoltan1
Visibility:
Public.

Description

Do not cache the result of RenderStyle::computedLineHeight() We currently use 26-bits in RenderBlock to cache the result of RenderStyle::computedLineHeight(). However when you look at the computations behind that function the main components are already cached so at most we are saving a handful of computations per call. In https://codereview.chromium.org/256593009/ we added a test that calls RenderBlock::lineHeight() ~425,000 times on each run. This CL results in no measurable degradation in performance against that test. So since we cannot get a measurable improvement in performance as a result of the caching when testing locally, remove it and free up space for more useful bits in RenderBlock. We will let it cycle through the perf bots for a while before allowing people to start using the spare bits though. The cached result originally sat in RenderText and was inherited from the fork from KHTML. http://trac.webkit.org/changeset/6010 moved it to RenderBlock on the basis that "calls to fontMetrics().lineSpacing() are expensive." This is no longer the case as far as I can tell, since both lineSpacing() and fontMetrics() are now cached themselves. Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=176233

Patch Set 1 #

Patch Set 2 : Updated #

Patch Set 3 : Updated #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -32 lines) Patch
M Source/core/rendering/FastTextAutosizer.cpp View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
M Source/core/rendering/RenderBR.h View 1 2 1 chunk +0 lines, -3 lines 0 comments Download
M Source/core/rendering/RenderBR.cpp View 2 chunks +2 lines, -12 lines 0 comments Download
M Source/core/rendering/RenderBlock.h View 1 2 2 chunks +1 line, -3 lines 0 comments Download
M Source/core/rendering/RenderBlock.cpp View 1 2 3 chunks +2 lines, -12 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
leviw_travelin_and_unemployed
LGTM, but please wait for perf bot baselines from https://codereview.chromium.org/256593009/ before landing (so give it ...
6 years, 7 months ago (2014-04-28 20:42:49 UTC) #1
rhogan
On 2014/04/28 20:42:49, leviw wrote: > LGTM, but please wait for perf bot baselines from ...
6 years, 7 months ago (2014-04-29 18:34:17 UTC) #2
leviw_travelin_and_unemployed
On 2014/04/29 18:34:17, rhogan wrote: > On 2014/04/28 20:42:49, leviw wrote: > > LGTM, but ...
6 years, 7 months ago (2014-04-29 20:15:28 UTC) #3
rhogan
The CQ bit was checked by robhogan@gmail.com
6 years, 6 months ago (2014-06-16 19:13:58 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/robhogan@gmail.com/260073005/30001
6 years, 6 months ago (2014-06-16 19:15:05 UTC) #5
commit-bot: I haz the power
6 years, 6 months ago (2014-06-16 19:18:35 UTC) #6
Message was sent while issue was closed.
Change committed as 176233

Powered by Google App Engine
This is Rietveld 408576698