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

Issue 1419033004: Add feature extraction for distillability to Blink (Closed)

Created:
5 years, 2 months ago by wychen
Modified:
5 years, 1 month ago
Reviewers:
mdjones, esprehn, dglazkov, jwd
CC:
blink-reviews, blink-reviews-api_chromium.org, blink-reviews-dom_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, rwlbuis, sof
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add feature extraction for distillability to Blink BUG=509869 TEST=webkit_unit_tests --gtest_filter=DocumentStatisticsCollectorTest.* Committed: https://crrev.com/db4d18afb53ef9ac67a03edefa2bbbafe50723a7 Cr-Commit-Position: refs/heads/master@{#359158}

Patch Set 1 #

Total comments: 81

Patch Set 2 : address comments, add tests #

Total comments: 51

Patch Set 3 : address comments, add saturation #

Total comments: 13

Patch Set 4 : address comments, remove innerText #

Total comments: 3

Patch Set 5 : fix linking issue #

Patch Set 6 : fix assertion style #

Patch Set 7 : don't trim textContent, remove debug msg #

Patch Set 8 : add mobile friendly detection #

Total comments: 8

Patch Set 9 : address dglazkov's comments #

Patch Set 10 : wrap long line #

Total comments: 24

Patch Set 11 : address esprehn's comments #

Patch Set 12 : avoid sqrt in global ctor #

Patch Set 13 : merge master #

Total comments: 14

Patch Set 14 : address esprehn's comments #

Total comments: 2

Patch Set 15 : stricter test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+482 lines, -0 lines) Patch
M third_party/WebKit/Source/core/core.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +3 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.h View 1 2 3 4 1 chunk +22 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +253 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/dom/DocumentStatisticsCollectorTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +156 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebDocument.cpp View 3 chunks +7 lines, -0 lines 0 comments Download
A third_party/WebKit/public/platform/WebDistillability.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +30 lines, -0 lines 0 comments Download
M third_party/WebKit/public/web/WebDocument.h View 2 chunks +2 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +9 lines, -0 lines 0 comments Download

Messages

Total messages: 62 (17 generated)
wychen
The Blink-side of the following CL in patch set 13 is split here. PTAL. Thanks! ...
5 years, 2 months ago (2015-10-23 02:52:32 UTC) #2
wychen
Migrated some ongoing questions from https://codereview.chromium.org/1248643004 below for easier reply. https://codereview.chromium.org/1419033004/diff/1/third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp File third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp (right): https://codereview.chromium.org/1419033004/diff/1/third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp#newcode45 ...
5 years, 2 months ago (2015-10-23 02:55:47 UTC) #3
esprehn
Is there a design doc on why you're collecting so much information about the entire ...
5 years, 2 months ago (2015-10-23 04:59:15 UTC) #4
esprehn
fyi: the existing extract_features.js is 13ms on wikipedia cats and 230ms on the html spec ...
5 years, 2 months ago (2015-10-23 05:17:30 UTC) #5
dglazkov
On 2015/10/23 at 05:17:30, esprehn wrote: > fyi: the existing extract_features.js is 13ms on wikipedia ...
5 years, 2 months ago (2015-10-23 16:32:09 UTC) #6
wychen
Thank you for the very detailed review! It's very appreciated. I'll fix the code accordingly ...
5 years, 2 months ago (2015-10-23 18:56:35 UTC) #7
wychen
Thanks for your detailed feedback! This CL is in a better shape now. Could you ...
5 years, 1 month ago (2015-10-26 20:40:52 UTC) #10
esprehn
https://codereview.chromium.org/1419033004/diff/40001/third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp File third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp (right): https://codereview.chromium.org/1419033004/diff/40001/third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp#newcode28 third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp:28: unsigned trimmedTextContentLength(Element& root) Do pages usually have enough whitespace ...
5 years, 1 month ago (2015-10-26 21:43:09 UTC) #11
wychen
For patch set 3, two distillability runs for https://en.wikipedia.org/wiki/Cat on Nexus 5 are: openGraph: 0, ...
5 years, 1 month ago (2015-10-27 23:52:12 UTC) #13
dglazkov
https://codereview.chromium.org/1419033004/diff/80001/third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp File third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp (right): https://codereview.chromium.org/1419033004/diff/80001/third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp#newcode228 third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp:228: document.updateLayout(); Instead of updateLayout, just ASSERT to ensure the ...
5 years, 1 month ago (2015-10-27 23:59:19 UTC) #14
esprehn
innerText length is essentially the same as the textContent length if you only accumulate visible ...
5 years, 1 month ago (2015-10-28 00:07:28 UTC) #15
wychen
https://codereview.chromium.org/1419033004/diff/80001/third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp File third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp (right): https://codereview.chromium.org/1419033004/diff/80001/third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp#newcode78 third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp:78: const blink::ComputedStyle* style = element.ensureComputedStyle(); On 2015/10/28 00:07:28, esprehn ...
5 years, 1 month ago (2015-10-28 00:25:45 UTC) #16
esprehn
https://codereview.chromium.org/1419033004/diff/80001/third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp File third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp (right): https://codereview.chromium.org/1419033004/diff/80001/third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp#newcode78 third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp:78: const blink::ComputedStyle* style = element.ensureComputedStyle(); On 2015/10/28 at 00:25:45, ...
5 years, 1 month ago (2015-10-28 00:37:17 UTC) #17
wychen
https://codereview.chromium.org/1419033004/diff/80001/third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp File third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp (right): https://codereview.chromium.org/1419033004/diff/80001/third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp#newcode78 third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp:78: const blink::ComputedStyle* style = element.ensureComputedStyle(); On 2015/10/28 00:37:17, esprehn ...
5 years, 1 month ago (2015-10-28 00:49:46 UTC) #18
esprehn
https://codereview.chromium.org/1419033004/diff/80001/third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp File third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp (right): https://codereview.chromium.org/1419033004/diff/80001/third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp#newcode78 third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp:78: const blink::ComputedStyle* style = element.ensureComputedStyle(); On 2015/10/28 at 00:49:46, ...
5 years, 1 month ago (2015-10-28 00:57:19 UTC) #19
wychen
innerText is removed as well. With these changes, the typical cost should be <5ms for ...
5 years, 1 month ago (2015-10-28 22:00:51 UTC) #21
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1419033004/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1419033004/160001
5 years, 1 month ago (2015-10-30 16:04:21 UTC) #23
wychen
Not trimming turned out to be not too bad, so I've changed that. Could you ...
5 years, 1 month ago (2015-10-30 17:01:52 UTC) #25
wychen
I'd appreciate if you could let me know what I should modify before landing. Thanks ...
5 years, 1 month ago (2015-11-02 17:43:33 UTC) #26
dglazkov
On 2015/11/02 at 17:43:33, wychen wrote: > The visibility model used here is the same ...
5 years, 1 month ago (2015-11-02 19:00:46 UTC) #27
wychen
On 2015/11/02 19:00:46, dglazkov wrote: > On 2015/11/02 at 17:43:33, wychen wrote: > > The ...
5 years, 1 month ago (2015-11-02 19:24:40 UTC) #28
dglazkov
On 2015/11/02 at 19:24:40, wychen wrote: > On 2015/11/02 19:00:46, dglazkov wrote: > > On ...
5 years, 1 month ago (2015-11-02 19:25:38 UTC) #29
wychen
On 2015/11/02 19:25:38, dglazkov wrote: > I think the JS feature extraction is just wrong. ...
5 years, 1 month ago (2015-11-02 23:57:21 UTC) #30
dglazkov
On 2015/11/02 at 23:57:21, wychen wrote: > On 2015/11/02 19:25:38, dglazkov wrote: > > I ...
5 years, 1 month ago (2015-11-03 04:45:30 UTC) #31
dglazkov
https://codereview.chromium.org/1419033004/diff/210001/third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp File third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp (right): https://codereview.chromium.org/1419033004/diff/210001/third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp#newcode34 third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp:34: // This skips shadow dom intentionally. Please explain why ...
5 years, 1 month ago (2015-11-03 04:45:37 UTC) #32
dglazkov
Also, can we add performance metrics around this code, so that we can track performance ...
5 years, 1 month ago (2015-11-03 04:48:54 UTC) #33
wychen
UMA is also added. PTAL. https://codereview.chromium.org/1419033004/diff/210001/third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp File third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp (right): https://codereview.chromium.org/1419033004/diff/210001/third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp#newcode34 third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp:34: // This skips shadow ...
5 years, 1 month ago (2015-11-03 07:13:41 UTC) #34
esprehn
https://codereview.chromium.org/1419033004/diff/120001/third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp File third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp (right): https://codereview.chromium.org/1419033004/diff/120001/third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp#newcode71 third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp:71: ASSERT(style->display() != NONE); this isn't true, you can still ...
5 years, 1 month ago (2015-11-03 07:45:10 UTC) #35
wychen
https://codereview.chromium.org/1419033004/diff/120001/third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp File third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp (right): https://codereview.chromium.org/1419033004/diff/120001/third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp#newcode71 third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp:71: ASSERT(style->display() != NONE); On 2015/11/03 07:45:10, esprehn wrote: > ...
5 years, 1 month ago (2015-11-03 08:59:49 UTC) #36
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1419033004/270001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1419033004/270001
5 years, 1 month ago (2015-11-03 19:48:29 UTC) #38
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/135406)
5 years, 1 month ago (2015-11-03 20:04:35 UTC) #40
esprehn
So close! https://codereview.chromium.org/1419033004/diff/330001/third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp File third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp (right): https://codereview.chromium.org/1419033004/diff/330001/third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp#newcode60 third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp:60: const ComputedStyle* style = element.computedStyle(); you need ...
5 years, 1 month ago (2015-11-05 01:21:59 UTC) #42
wychen
https://codereview.chromium.org/1419033004/diff/330001/third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp File third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp (right): https://codereview.chromium.org/1419033004/diff/330001/third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp#newcode60 third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp:60: const ComputedStyle* style = element.computedStyle(); On 2015/11/05 01:21:59, esprehn ...
5 years, 1 month ago (2015-11-05 01:47:40 UTC) #43
esprehn
lgtm, dglazkov@ look good to you? https://codereview.chromium.org/1419033004/diff/330001/third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp File third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp (right): https://codereview.chromium.org/1419033004/diff/330001/third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp#newcode212 third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp:212: return frameHost->visualViewport().shouldDisableDesktopWorkarounds(); Not ...
5 years, 1 month ago (2015-11-05 01:54:17 UTC) #44
wychen
https://codereview.chromium.org/1419033004/diff/330001/third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp File third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp (right): https://codereview.chromium.org/1419033004/diff/330001/third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp#newcode212 third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp:212: return frameHost->visualViewport().shouldDisableDesktopWorkarounds(); On 2015/11/05 01:54:17, esprehn wrote: > Not ...
5 years, 1 month ago (2015-11-05 02:00:00 UTC) #45
dglazkov
lgtm
5 years, 1 month ago (2015-11-05 02:00:46 UTC) #46
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1419033004/370001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1419033004/370001
5 years, 1 month ago (2015-11-05 02:02:51 UTC) #48
wychen
jwd@, could you take a look at the UMA xml? Thanks!
5 years, 1 month ago (2015-11-05 02:07:47 UTC) #50
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/136340)
5 years, 1 month ago (2015-11-05 02:56:37 UTC) #52
jwd
lgtm
5 years, 1 month ago (2015-11-06 20:57:39 UTC) #53
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1419033004/370001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1419033004/370001
5 years, 1 month ago (2015-11-11 18:48:29 UTC) #56
commit-bot: I haz the power
Try jobs failed on following builders: ios_rel_device_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_rel_device_ninja/builds/134946)
5 years, 1 month ago (2015-11-11 18:56:12 UTC) #58
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1419033004/370001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1419033004/370001
5 years, 1 month ago (2015-11-11 20:49:41 UTC) #60
commit-bot: I haz the power
Committed patchset #15 (id:370001)
5 years, 1 month ago (2015-11-11 21:24:03 UTC) #61
commit-bot: I haz the power
5 years, 1 month ago (2015-11-12 20:00:26 UTC) #62
Message was sent while issue was closed.
Patchset 15 (id:??) landed as
https://crrev.com/db4d18afb53ef9ac67a03edefa2bbbafe50723a7
Cr-Commit-Position: refs/heads/master@{#359158}

Powered by Google App Engine
This is Rietveld 408576698