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

Issue 1900513002: Prevent to measure the whole word when break-word (Closed)

Created:
4 years, 8 months ago by kojii
Modified:
4 years, 8 months ago
Reviewers:
drott, eae
CC:
blink-reviews, blink-reviews-layout_chromium.org, chromium-reviews, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Prevent to measure the whole word when break-word crrev.com/385693 changed the line breaker to measure word-by-word then rewind if break-word/break-all. This causes a performance regression when a word is extraordinary long, such as minified JS/CSS or hex/base64 data. This patch fixes to measure character-by-character, but unlike before r385693, it lets overflow by 2em then rewind to the correct position. This prevents the line breaker to measure the whole word, while still measuring ligatures/kernings correctly as long as the sum of such effects is within 2em. BUG=603398 Committed: https://crrev.com/41fe145a8629f1f7002b41a8e12687b97d5e635f Cr-Commit-Position: refs/heads/master@{#387974}

Patch Set 1 #

Patch Set 2 : Change 50px to 2em to support font-size better #

Patch Set 3 : Manual rebaseline #

Messages

Total messages: 20 (12 generated)
kojii
Not fully tested yet, but here's another proposal to solve the perf issue in break-word. ...
4 years, 8 months ago (2016-04-18 06:30:21 UTC) #3
kojii
To help you to review the diff; the "if" block is simply a revert of ...
4 years, 8 months ago (2016-04-18 06:38:24 UTC) #5
kojii
For the test case in crbug.com/603398 (9233 bytes of hex string) on a Linux release+buildtype=Official ...
4 years, 8 months ago (2016-04-18 06:50:27 UTC) #6
drott
I took a look at this, Koji, but I am afraid I can't judge this ...
4 years, 8 months ago (2016-04-18 07:27:50 UTC) #9
eae
LGTM
4 years, 8 months ago (2016-04-18 17:55:12 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1900513002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1900513002/40001
4 years, 8 months ago (2016-04-18 18:55:42 UTC) #15
commit-bot: I haz the power
Failed to apply the patch.
4 years, 8 months ago (2016-04-18 19:02:41 UTC) #17
commit-bot: I haz the power
4 years, 8 months ago (2016-04-18 19:03:42 UTC) #20
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/41fe145a8629f1f7002b41a8e12687b97d5e635f
Cr-Commit-Position: refs/heads/master@{#387974}

Powered by Google App Engine
This is Rietveld 408576698