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

Issue 200053007: Documents with many lines overallocated pagination info. (Closed)

Created:
6 years, 9 months ago by Daniel Bratell
Modified:
6 years, 8 months ago
CC:
blink-reviews, bemjb+rendering_chromium.org, dsinclair, zoltan1, eae+blinkwatch, leviw+renderwatch, jchaffraix+rendering, pdr., rune, mstensho (USE GERRIT), fs
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Documents with many lines overallocated pagination info. There is an object LineFragmentationData that is used for pagination that is created on demand. That object was created for normal documents and cost roughly 32 bytes per line, adding up to 3-5 MB on a big text document (5% of all memory usage). Testcase: http://norvig.com/big.txt - 3-10 MB RAM savings. I don't know what I'm doing but this patch prevents the allocation and saves the memory. BUG=353993 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=170497

Patch Set 1 #

Total comments: 3

Patch Set 2 : Simplified condition #

Total comments: 2

Patch Set 3 : Rebased #

Patch Set 4 : Skipped intermediate variable #

Patch Set 5 : Removed intermediate variable #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -1 line) Patch
M Source/core/rendering/RootInlineBox.cpp View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 12 (0 generated)
Daniel Bratell
dglazkov, can you please take a look at this one-liner? (Asking you because I think ...
6 years, 9 months ago (2014-03-19 13:09:26 UTC) #1
dglazkov
if I touched it, it might have been an accident :P Julien, Levi, can you ...
6 years, 9 months ago (2014-03-19 15:45:27 UTC) #2
leviw_travelin_and_unemployed
https://codereview.chromium.org/200053007/diff/1/Source/core/rendering/RootInlineBox.cpp File Source/core/rendering/RootInlineBox.cpp (right): https://codereview.chromium.org/200053007/diff/1/Source/core/rendering/RootInlineBox.cpp#newcode252 Source/core/rendering/RootInlineBox.cpp:252: bool paginated = block().view()->layoutState() && block().view()->layoutState()->isPaginated(); If there's no ...
6 years, 9 months ago (2014-03-20 18:05:38 UTC) #3
leviw_travelin_and_unemployed
https://codereview.chromium.org/200053007/diff/1/Source/core/rendering/RootInlineBox.cpp File Source/core/rendering/RootInlineBox.cpp (right): https://codereview.chromium.org/200053007/diff/1/Source/core/rendering/RootInlineBox.cpp#newcode252 Source/core/rendering/RootInlineBox.cpp:252: bool paginated = block().view()->layoutState() && block().view()->layoutState()->isPaginated(); So thinking about ...
6 years, 9 months ago (2014-03-20 18:41:26 UTC) #4
Daniel Bratell
Good, then the code is even shorter! This looking ok? https://codereview.chromium.org/200053007/diff/1/Source/core/rendering/RootInlineBox.cpp File Source/core/rendering/RootInlineBox.cpp (right): https://codereview.chromium.org/200053007/diff/1/Source/core/rendering/RootInlineBox.cpp#newcode252 ...
6 years, 9 months ago (2014-03-21 10:33:15 UTC) #5
Daniel Bratell
Good, then the code is even shorter! This looking ok?
6 years, 9 months ago (2014-03-21 10:33:16 UTC) #6
mstensho (USE GERRIT)
lgtm with a nit. (I'm not an owner) https://codereview.chromium.org/200053007/diff/20001/Source/core/rendering/RootInlineBox.cpp File Source/core/rendering/RootInlineBox.cpp (right): https://codereview.chromium.org/200053007/diff/20001/Source/core/rendering/RootInlineBox.cpp#newcode252 Source/core/rendering/RootInlineBox.cpp:252: bool ...
6 years, 9 months ago (2014-03-28 09:49:21 UTC) #7
Daniel Bratell
I've done the requested simplifications. https://codereview.chromium.org/200053007/diff/20001/Source/core/rendering/RootInlineBox.cpp File Source/core/rendering/RootInlineBox.cpp (right): https://codereview.chromium.org/200053007/diff/20001/Source/core/rendering/RootInlineBox.cpp#newcode252 Source/core/rendering/RootInlineBox.cpp:252: bool paginated = block().view()->layoutState()->isPaginated(); ...
6 years, 8 months ago (2014-03-31 15:29:39 UTC) #8
leviw_travelin_and_unemployed
You description feels like it needs an "I have no idea what I'm doing" dog ...
6 years, 8 months ago (2014-03-31 22:27:59 UTC) #9
leviw_travelin_and_unemployed
The CQ bit was checked by leviw@chromium.org
6 years, 8 months ago (2014-03-31 22:28:05 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bratell@opera.com/200053007/80001
6 years, 8 months ago (2014-03-31 22:28:15 UTC) #11
commit-bot: I haz the power
6 years, 8 months ago (2014-04-01 00:17:21 UTC) #12
Message was sent while issue was closed.
Change committed as 170497

Powered by Google App Engine
This is Rietveld 408576698