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

Issue 302063002: Always preload all tokens before parsing (Closed)

Created:
6 years, 6 months ago by eseidel
Modified:
6 years, 6 months ago
Reviewers:
tonyg, Nate Chapin
CC:
blink-reviews, dglazkov+blink, blink-reviews-html_chromium.org, mkwst+watchlist_chromium.org, tonyg, oystein (OOO til 10th of July), abarth-chromium, mnaganov (inactive)
Visibility:
Public.

Description

Always preload all tokens before parsing If Android WebView tests break from this change, please disable those tests: crbug.com/387101 This change is in preparation for re-writing the path through which tokens are handled on the main thread to allow them to be batched and deferred until more important work is done: https://codereview.chromium.org/258013009/ Currently the threaded parser uses the main thread's MessageQueue as its work-queue and we'll commonly queue 10 chunks of work in the main thread MessageQueue even if the first chunk takes a long time we'll still have to process the next 9 before we can do more important things like put up a frame because we don't have a separate queue for parser work. 258013009 will fix that. http/tests/security/script-crossorigin-loads-correctly-credentials-2.html originally started failing with this change and it turns out that always-preloading found a real bug in CORS handling with preloads. The ResourceFetcher was incorrectly always reusing an in-flight preload request, even if the CORS state didn't match. Nate helped me re-order the calls in requestResource to fix it. This change also discovered 2 other bugs in the preloader. 1. a preload request != LinkPrefect request and one will cancel the other. crbug.com/379893 2. The preloader has no concept of script type and will blindly issue preloads for all <script href> regardless of <script type>. I decided this didn't matter in practice. Making the <script type> handling threadsafe isn't worth the trouble. I would anticipate that this change might make some speed-index scores better (we'll now be preloading all tokens slightly sooner, especially those which are in the same chunk as a long inline script block for instance), but may make non-network PLT scores lower (due to extra mallocs required to process every chunk since more loads will be preloaded just before their actually loaded). BUG=356292 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=175427 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=176642

Patch Set 1 #

Patch Set 2 : Fix CORS handling of preloader requests #

Patch Set 3 : Fix CORS issue with preloader #

Total comments: 3

Patch Set 4 : Updated per tony's review #

Patch Set 5 : Mac baselinew #

Patch Set 6 : Fix another flaky tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+51 lines, -9 lines) Patch
M LayoutTests/fast/dom/HTMLLinkElement/link-and-subresource-test.html View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M LayoutTests/fast/dom/HTMLLinkElement/link-and-subresource-test-expected.txt View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
M LayoutTests/fast/dom/HTMLScriptElement/dont-load-unknown-type.html View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/fast/dom/HTMLScriptElement/dont-load-unknown-type-expected.txt View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M LayoutTests/fast/events/drag-and-drop-autoscroll-inner-frame.html View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M LayoutTests/http/tests/security/contentSecurityPolicy/block-mixed-content-hides-warning-expected.txt View 1 chunk +2 lines, -0 lines 0 comments Download
M LayoutTests/http/tests/security/mixedContent/insecure-css-in-iframe-expected.txt View 1 chunk +2 lines, -0 lines 0 comments Download
M LayoutTests/http/tests/security/mixedContent/insecure-css-in-main-frame-expected.txt View 1 chunk +2 lines, -0 lines 0 comments Download
M LayoutTests/http/tests/security/mixedContent/insecure-image-in-main-frame-allowed-expected.txt View 1 chunk +2 lines, -0 lines 0 comments Download
M LayoutTests/http/tests/security/mixedContent/insecure-image-in-main-frame-blocked-expected.txt View 1 chunk +2 lines, -0 lines 0 comments Download
M LayoutTests/http/tests/security/mixedContent/insecure-image-in-main-frame-expected.txt View 1 chunk +2 lines, -0 lines 0 comments Download
M LayoutTests/http/tests/security/mixedContent/insecure-script-in-data-iframe-in-main-frame-blocked-expected.txt View 1 chunk +2 lines, -0 lines 0 comments Download
M LayoutTests/http/tests/security/mixedContent/insecure-script-in-iframe-expected.txt View 1 chunk +2 lines, -0 lines 0 comments Download
M LayoutTests/http/tests/security/mixedContent/insecure-script-in-main-frame-allowed-expected.txt View 1 chunk +2 lines, -0 lines 0 comments Download
M LayoutTests/http/tests/security/mixedContent/insecure-script-in-main-frame-blocked-expected.txt View 1 chunk +2 lines, -0 lines 0 comments Download
M LayoutTests/http/tests/security/mixedContent/redirect-http-to-https-script-in-iframe-expected.txt View 1 chunk +2 lines, -0 lines 0 comments Download
A LayoutTests/platform/mac/fast/dom/HTMLScriptElement/dont-load-unknown-type-expected.txt View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M LayoutTests/tables/mozilla_expected_failures/bugs/bug128876-expected.txt View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/fetch/ResourceFetcher.cpp View 1 2 3 4 3 chunks +8 lines, -4 lines 0 comments Download
M Source/core/html/parser/HTMLDocumentParser.cpp View 1 2 3 4 1 chunk +7 lines, -1 line 0 comments Download

Messages

Total messages: 34 (0 generated)
eseidel
This change shouldn't affect layout tests (other than the ones which log preload events), but ...
6 years, 6 months ago (2014-05-29 21:23:40 UTC) #1
eseidel
6 years, 6 months ago (2014-05-29 22:59:43 UTC) #2
eseidel
I believe this is now ready for review.
6 years, 6 months ago (2014-05-29 22:59:50 UTC) #3
tonyg
everything other than the two layout test failures lg2m. And it is very possible those ...
6 years, 6 months ago (2014-05-29 23:27:25 UTC) #4
blink-reviews
I'll kick it off in the morning. Should have some early data by eod tomorrow. ...
6 years, 6 months ago (2014-05-29 23:47:26 UTC) #5
Pat Meenan
Test is up and running and I'll post results when they're ready (probably Monday or ...
6 years, 6 months ago (2014-05-30 12:37:31 UTC) #6
Pat Meenan
On 2014/05/30 12:37:31, Pat Meenan wrote: > Test is up and running and I'll post ...
6 years, 6 months ago (2014-05-30 22:59:48 UTC) #7
eseidel
Tony: You're right that both of those tests look like failures. I understand both of ...
6 years, 6 months ago (2014-06-02 20:30:15 UTC) #8
eseidel
The CQ bit was checked by eseidel@chromium.org
6 years, 6 months ago (2014-06-02 20:30:20 UTC) #9
eseidel
The CQ bit was unchecked by eseidel@chromium.org
6 years, 6 months ago (2014-06-02 20:30:22 UTC) #10
eseidel
PTAL.
6 years, 6 months ago (2014-06-02 20:35:43 UTC) #11
tonyg
lgtm
6 years, 6 months ago (2014-06-02 20:43:05 UTC) #12
Nate Chapin
On 2014/06/02 20:35:43, eseidel wrote: > PTAL. LGTM
6 years, 6 months ago (2014-06-02 20:43:58 UTC) #13
eseidel
The CQ bit was checked by eseidel@chromium.org
6 years, 6 months ago (2014-06-02 20:57:39 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/eseidel@chromium.org/302063002/60001
6 years, 6 months ago (2014-06-02 20:58:07 UTC) #15
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: mac_blink_rel on tryserver.blink ...
6 years, 6 months ago (2014-06-02 22:11:25 UTC) #16
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-02 22:51:55 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: mac_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/mac_blink_rel/builds/9940)
6 years, 6 months ago (2014-06-02 22:51:55 UTC) #18
eseidel
The CQ bit was checked by eseidel@chromium.org
6 years, 6 months ago (2014-06-03 18:59:34 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/eseidel@chromium.org/302063002/80001
6 years, 6 months ago (2014-06-03 18:59:56 UTC) #20
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_blink_dbg on tryserver.blink ...
6 years, 6 months ago (2014-06-03 20:25:16 UTC) #21
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-03 20:49:43 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: linux_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/10606)
6 years, 6 months ago (2014-06-03 20:49:43 UTC) #23
eseidel
The CQ bit was checked by eseidel@chromium.org
6 years, 6 months ago (2014-06-03 21:54:29 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/eseidel@chromium.org/302063002/80001
6 years, 6 months ago (2014-06-03 21:54:52 UTC) #25
eseidel
The CQ bit was checked by eseidel@chromium.org
6 years, 6 months ago (2014-06-03 22:59:28 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/eseidel@chromium.org/302063002/90001
6 years, 6 months ago (2014-06-03 23:00:10 UTC) #27
commit-bot: I haz the power
Change committed as 175427
6 years, 6 months ago (2014-06-04 02:21:17 UTC) #28
Pat Meenan
On 2014/05/30 22:59:48, Pat Meenan wrote: > On 2014/05/30 12:37:31, Pat Meenan wrote: > > ...
6 years, 6 months ago (2014-06-04 12:18:09 UTC) #29
Julien - ping for review
A revert of this CL has been created in https://codereview.chromium.org/317703005/ by jchaffraix@chromium.org. The reason for ...
6 years, 6 months ago (2014-06-04 20:21:03 UTC) #30
eseidel
relanding
6 years, 6 months ago (2014-06-20 19:59:58 UTC) #31
eseidel
The CQ bit was checked by eseidel@chromium.org
6 years, 6 months ago (2014-06-20 20:00:18 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/eseidel@chromium.org/302063002/90001
6 years, 6 months ago (2014-06-20 20:01:27 UTC) #33
commit-bot: I haz the power
6 years, 6 months ago (2014-06-20 20:13:49 UTC) #34
Message was sent while issue was closed.
Change committed as 176642

Powered by Google App Engine
This is Rietveld 408576698