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. Review URL: https://codereview.chromium.org/260073005 git-svn-id: svn://svn.chromium.org/blink/trunk@176233 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Showing
Please register or sign in to comment