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

Issue 317703005: Revert of Always preload all tokens before parsing (Closed)

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

Description

Revert of Always preload all tokens before parsing (https://codereview.chromium.org/302063002/) Reason for revert: This change breaks: org.chromium.android_webview.test.AwSettingsTest#testBlockNetworkImagesDoesNotBlockDataUrlImage Probably because it pre-loads images when "automatically load images" is disabled on Android. See http://build.chromium.org/p/tryserver.chromium/builders/android_dbg_triggered_tests/builds/159696/steps/androidwebview_instrumentation_tests/logs/stdio Original issue's description: > Always preload all tokens before parsing > > 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 TBR=tonyg@chromium.org,japhet@chromium.org,eseidel@chromium.org NOTREECHECKS=true NOTRY=true BUG=356292 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=175512

Patch Set 1 #

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

Messages

Total messages: 3 (0 generated)
Julien - ping for review
Created Revert of Always preload all tokens before parsing
6 years, 6 months ago (2014-06-04 20:21:04 UTC) #1
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jchaffraix@chromium.org/317703005/1
6 years, 6 months ago (2014-06-04 20:21:39 UTC) #2
commit-bot: I haz the power
6 years, 6 months ago (2014-06-04 20:22:28 UTC) #3
Message was sent while issue was closed.
Change committed as 175512

Powered by Google App Engine
This is Rietveld 408576698