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

Issue 1394663004: Reland: BackgroundHTMLParser: Introduce ParsedChunkQueue to pass ParsedChunks to main thread (Closed)

Created:
5 years, 2 months ago by kouhei (in TOK)
Modified:
5 years, 1 month ago
CC:
blink-reviews, blink-reviews-html_chromium.org, chromium-reviews, dglazkov+blink, kinuko+watch
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Reland: BackgroundHTMLParser: Introduce ParsedChunkQueue to pass ParsedChunks to main thread Fixed shutdown race issue: ParsedChunkQueue is now ThreadSafeRefCounted. --- Before this CL, each ParsedChunk from the background parser thread was posted as separate tasks, which wasted time in main thread on poor CPU devices (esp. mobiles). This CL attempts to minimize postTask by passing ParsedChunks via introduced ParsedChunkQueue class and only using postTask to notify that it is not empty. BUG=540988 Committed: https://crrev.com/63f797324ae8302ddd405bf4f7b9a03ca3926f8d Cr-Commit-Position: refs/heads/master@{#356261} Committed: https://crrev.com/36769005e024e32de8436b573f4652e59acc2f93 Cr-Commit-Position: refs/heads/master@{#356739}

Patch Set 1 #

Patch Set 2 : add missing files #

Patch Set 3 : add copyright and rebase #

Total comments: 1

Patch Set 4 : rename method #

Total comments: 4

Patch Set 5 : clear parsedchunkqueue on resumefrom #

Total comments: 4

Patch Set 6 : add comment / isEmpty #

Patch Set 7 : ParsedChunkQueue should be ThreadSafeRefCounted #

Unified diffs Side-by-side diffs Delta from patch set Stats (+126 lines, -12 lines) Patch
M third_party/WebKit/Source/core/core.gypi View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.h View 1 2 3 4 5 6 3 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.cpp View 1 2 3 4 5 6 3 chunks +8 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.h View 1 2 3 4 5 6 3 chunks +4 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp View 1 2 3 4 4 chunks +16 lines, -6 lines 0 comments Download
A third_party/WebKit/Source/core/html/parser/ParsedChunkQueue.h View 1 2 3 4 5 6 1 chunk +51 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/html/parser/ParsedChunkQueue.cpp View 1 2 3 4 5 6 1 chunk +42 lines, -0 lines 0 comments Download

Messages

Total messages: 43 (14 generated)
kouhei (in TOK)
Still prototypy, but works. tzik: Would you measure performance gain from this patch on your ...
5 years, 2 months ago (2015-10-13 02:24:47 UTC) #2
tzik
On 2015/10/13 02:24:47, kouhei (catching-up) wrote: > Still prototypy, but works. > tzik: Would you ...
5 years, 2 months ago (2015-10-13 04:07:59 UTC) #3
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1394663004/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1394663004/20001
5 years, 2 months ago (2015-10-13 05:02:08 UTC) #5
kouhei (in TOK)
tzik: Thanks for measuring! yoav, kinuko: Would you take a look?
5 years, 2 months ago (2015-10-13 05:36:39 UTC) #6
kinuko
Looking reasonable. Should we be wary of the queue length in such cases? (we would ...
5 years, 2 months ago (2015-10-13 10:21:41 UTC) #7
kouhei (in TOK)
On 2015/10/13 10:21:41, kinuko wrote: > Looking reasonable. Should we be wary of the queue ...
5 years, 2 months ago (2015-10-19 03:50:42 UTC) #8
kouhei (in TOK)
On 2015/10/19 03:50:42, kouhei wrote: > On 2015/10/13 10:21:41, kinuko wrote: > > Looking reasonable. ...
5 years, 2 months ago (2015-10-19 04:00:28 UTC) #9
kinuko
ok. lgtm I'm still interested in how many chunks we could be queuing (in whichever ...
5 years, 2 months ago (2015-10-19 09:18:03 UTC) #10
Yoav Weiss
On 2015/10/19 09:18:03, kinuko wrote: > ok. lgtm > > I'm still interested in how ...
5 years, 2 months ago (2015-10-19 12:35:26 UTC) #11
esprehn
https://codereview.chromium.org/1394663004/diff/60001/third_party/WebKit/Source/core/html/parser/ParsedChunkQueue.cpp File third_party/WebKit/Source/core/html/parser/ParsedChunkQueue.cpp (right): https://codereview.chromium.org/1394663004/diff/60001/third_party/WebKit/Source/core/html/parser/ParsedChunkQueue.cpp#newcode23 third_party/WebKit/Source/core/html/parser/ParsedChunkQueue.cpp:23: void ParsedChunkQueue::takeAll(Vector<OwnPtr<HTMLDocumentParser::ParsedChunk>>* vec) vector, don't abbreviate in blink. :) ...
5 years, 2 months ago (2015-10-20 23:48:20 UTC) #15
kouhei (in TOK)
PTAL. LayoutTest failure fixed. https://codereview.chromium.org/1394663004/diff/60001/third_party/WebKit/Source/core/html/parser/ParsedChunkQueue.cpp File third_party/WebKit/Source/core/html/parser/ParsedChunkQueue.cpp (right): https://codereview.chromium.org/1394663004/diff/60001/third_party/WebKit/Source/core/html/parser/ParsedChunkQueue.cpp#newcode23 third_party/WebKit/Source/core/html/parser/ParsedChunkQueue.cpp:23: void ParsedChunkQueue::takeAll(Vector<OwnPtr<HTMLDocumentParser::ParsedChunk>>* vec) On 2015/10/20 ...
5 years, 1 month ago (2015-10-26 07:42:03 UTC) #16
Yoav Weiss
LGTM % nits https://codereview.chromium.org/1394663004/diff/80001/third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.cpp File third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.cpp (right): https://codereview.chromium.org/1394663004/diff/80001/third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.cpp#newcode296 third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.cpp:296: bool firstChunk = m_parsedChunkQueue->enqueue(chunk.release()); firstChunk is ...
5 years, 1 month ago (2015-10-26 07:50:56 UTC) #17
kouhei (in TOK)
Thanks! https://codereview.chromium.org/1394663004/diff/80001/third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.cpp File third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.cpp (right): https://codereview.chromium.org/1394663004/diff/80001/third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.cpp#newcode296 third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.cpp:296: bool firstChunk = m_parsedChunkQueue->enqueue(chunk.release()); On 2015/10/26 07:50:56, Yoav ...
5 years, 1 month ago (2015-10-27 05:57:37 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1394663004/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1394663004/100001
5 years, 1 month ago (2015-10-27 05:57:41 UTC) #21
commit-bot: I haz the power
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/131633)
5 years, 1 month ago (2015-10-27 06:58:48 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1394663004/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1394663004/100001
5 years, 1 month ago (2015-10-27 08:45:40 UTC) #25
commit-bot: I haz the power
Committed patchset #6 (id:100001)
5 years, 1 month ago (2015-10-27 10:10:30 UTC) #26
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/63f797324ae8302ddd405bf4f7b9a03ca3926f8d Cr-Commit-Position: refs/heads/master@{#356261}
5 years, 1 month ago (2015-10-27 10:11:27 UTC) #27
kouhei (in TOK)
A revert of this CL (patchset #6 id:100001) has been created in https://codereview.chromium.org/1422233002/ by kouhei@chromium.org. ...
5 years, 1 month ago (2015-10-27 11:58:16 UTC) #28
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1394663004/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1394663004/120001
5 years, 1 month ago (2015-10-28 04:28:48 UTC) #31
kouhei (in TOK)
kinuko: PTAL
5 years, 1 month ago (2015-10-28 04:29:45 UTC) #32
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 1 month ago (2015-10-28 07:12:00 UTC) #34
kinuko (google)
lgtm
5 years, 1 month ago (2015-10-29 02:00:56 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1394663004/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1394663004/120001
5 years, 1 month ago (2015-10-29 02:18:24 UTC) #38
Yoav Weiss
Are you sure RefPtr is thread safe? Has that recently changed?
5 years, 1 month ago (2015-10-29 02:20:23 UTC) #39
kouhei (in TOK)
On 2015/10/29 02:20:23, Yoav Weiss wrote: > Are you sure RefPtr is thread safe? Has ...
5 years, 1 month ago (2015-10-29 02:21:10 UTC) #40
Yoav Weiss
On 2015/10/29 02:21:10, kouhei wrote: > On 2015/10/29 02:20:23, Yoav Weiss wrote: > > Are ...
5 years, 1 month ago (2015-10-29 02:23:21 UTC) #41
commit-bot: I haz the power
Committed patchset #7 (id:120001)
5 years, 1 month ago (2015-10-29 02:23:45 UTC) #42
commit-bot: I haz the power
5 years, 1 month ago (2015-10-29 02:24:35 UTC) #43
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/36769005e024e32de8436b573f4652e59acc2f93
Cr-Commit-Position: refs/heads/master@{#356739}

Powered by Google App Engine
This is Rietveld 408576698