Preconnect hints from navigation predictor may be discarded by loading predictor |
||||
Issue descriptionNavigation predictor may send preconnect hints during different phases of the page load. e.g., when onLoad() event first, or when the tab or app is brought to the foreground. The latter 2 user actions indicate that user is going to interact with the webpage, so navigation predictor generated a hint to connect back to the origin of the main frame request. These hints are sent by the navigation predictor to the loading predictor. These hints arrive at loading predictor well after the navigation completes. However, it seems that the loading predictor has multiple checks that disregard (i) Hints sent after navigation completes, and (ii) duplicate hints. These checks are implemented https://cs.chromium.org/chromium/src/chrome/browser/predictors/loading_predictor.cc?rcl=a60b6a5add634cf45ee443f226a04e99b0f6af42&l=82 and https://cs.chromium.org/chromium/src/chrome/browser/predictors/preconnect_manager.cc?rcl=a60b6a5add634cf45ee443f226a04e99b0f6af42&l=75. We should figure out a way to remove these checks for navigation predictor hints. One way is to set a timeout value. If a hint arrives from navigation predictor after timeout, then the duplicate hint would be processed and dispatched by the loading predictor to the network service.
,
Jan 9
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/144e2aa14e40cbb9128feb2407419785ab876e5d commit 144e2aa14e40cbb9128feb2407419785ab876e5d Author: Tarun Bansal <tbansal@chromium.org> Date: Wed Jan 09 19:04:46 2019 Loading predictor: Allow processing of duplicate hints Navigation predictor may send preconnect hints multiple times during and after the page load. This CL relaxes some of the checks in the loading predictor to allow such duplicate hints to be processed. A duplicate hint is processed only after the first hint has completed. Consecutive hints for the same URL would still not be processed. Change-Id: I0101119159eead1df5c7824861d7687dc88f44c9 Bug: 919566 Reviewed-on: https://chromium-review.googlesource.com/c/1397433 Commit-Queue: Tarun Bansal <tbansal@chromium.org> Reviewed-by: Alexandr Ilin <alexilin@chromium.org> Cr-Commit-Position: refs/heads/master@{#621248} [modify] https://crrev.com/144e2aa14e40cbb9128feb2407419785ab876e5d/chrome/browser/predictors/loading_predictor.cc [modify] https://crrev.com/144e2aa14e40cbb9128feb2407419785ab876e5d/chrome/browser/predictors/loading_predictor.h [modify] https://crrev.com/144e2aa14e40cbb9128feb2407419785ab876e5d/chrome/browser/predictors/loading_predictor_browsertest.cc [modify] https://crrev.com/144e2aa14e40cbb9128feb2407419785ab876e5d/chrome/browser/predictors/loading_predictor_unittest.cc
,
Jan 9
,
Jan 14
,
Jan 14
|
||||
►
Sign in to add a comment |
||||
Comment 1 by tbansal@chromium.org
, Jan 7