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

Issue 218373002: Remove hack in HTMLParserScheduler for deferring to layout while parsing. (Closed)

Created:
6 years, 8 months ago by eseidel
Modified:
6 years, 8 months ago
Reviewers:
tonyg, abarth-chromium
CC:
blink-reviews, dglazkov+blink, adamk+blink_chromium.org, tonyg, oystein (OOO til 10th of July), jamesr, esprehn, Pat Meenan
Visibility:
Public.

Description

Remove hack in HTMLParserScheduler for deferring to layout while parsing. This code was intending to make sure that layout() timers get a chance to fire before parser timers do. However we no longer use SharedTimer for schedulingLayout. Instead we use the compositor's scheduleAnimation timer which is only called when the compositor actually is going to put up a frame. I could imagine scenerios whereby a layout was scheduled and either was called and didn't clear the m_pendingLayout bit due to the Document being inactive or some other early-return, or a scenerio in which a layout was scheduled but the compistor never needed to put up a frame, which would result in the Parser spinning like this waiting for the layout timer to fire and clear the m_pendingLayout bool, but it never happened. As the FIXME said, the real fix here is to reduce the max duration of the parser and possibly coordinate with the compositor to allow the parser to do work directly after the frame has been put up, in the time when the main-thread is otherwise idle waiting for the compositor and gpu threads to actually put up the frame. This may cause a regression on SpeedIndex benchmarks and we may need to find a different way to implement what this code was trying to do. I was not able to produce a test which triggered this bug, but I'm confident it's possible to get Blink into such a confused state. BUG=288265 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=170472

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+0 lines, -9 lines) Patch
M Source/core/html/parser/HTMLParserScheduler.cpp View 2 chunks +0 lines, -9 lines 1 comment Download

Messages

Total messages: 8 (0 generated)
eseidel
6 years, 8 months ago (2014-03-29 20:00:38 UTC) #1
eseidel
6 years, 8 months ago (2014-03-29 20:00:57 UTC) #2
abarth-chromium
lgtm https://codereview.chromium.org/218373002/diff/1/Source/core/html/parser/HTMLParserScheduler.cpp File Source/core/html/parser/HTMLParserScheduler.cpp (left): https://codereview.chromium.org/218373002/diff/1/Source/core/html/parser/HTMLParserScheduler.cpp#oldcode95 Source/core/html/parser/HTMLParserScheduler.cpp:95: if (m_parser->document()->shouldParserYieldAgressivelyBeforeScriptExecution()) { Can we delete shouldParserYieldAgressivelyBeforeScriptExecution?
6 years, 8 months ago (2014-03-29 20:20:34 UTC) #3
eseidel
On 2014/03/29 20:20:34, abarth wrote: > lgtm > > https://codereview.chromium.org/218373002/diff/1/Source/core/html/parser/HTMLParserScheduler.cpp > File Source/core/html/parser/HTMLParserScheduler.cpp (left): > ...
6 years, 8 months ago (2014-03-29 23:52:45 UTC) #4
tonyg
lgtm2 I think the parser has some unnecessary defense like this against slow tree building. ...
6 years, 8 months ago (2014-03-31 14:49:10 UTC) #5
eseidel
The CQ bit was checked by eseidel@chromium.org
6 years, 8 months ago (2014-03-31 17:15:10 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/eseidel@chromium.org/218373002/1
6 years, 8 months ago (2014-03-31 17:15:24 UTC) #7
commit-bot: I haz the power
6 years, 8 months ago (2014-03-31 18:39:01 UTC) #8
Message was sent while issue was closed.
Change committed as 170472

Powered by Google App Engine
This is Rietveld 408576698