New issue
Advanced search Search tips

Issue 919566 link

Starred by 1 user

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug

Blocked on:
issue 921720

Blocking:
issue 908725



Sign in to add a comment

Preconnect hints from navigation predictor may be discarded by loading predictor

Project Member Reported by tbansal@chromium.org, Jan 7

Issue description

Navigation 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.
 
Cc: instant-nav@google.com
Project Member

Comment 2 by bugdroid1@chromium.org, 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

Labels: -M-74 M-73
Blockedon: 921720
Blocking: 908725

Sign in to add a comment