New issue
Advanced search Search tips

Issue 705955 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2017
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 3
Type: Bug



Sign in to add a comment

Prerender / Prefetch is slow

Project Member Reported by droger@chromium.org, Mar 28 2017

Issue description

As seen on histograms such as Prerender.omnibox_PrefetchTTFCP.Warm.Cacheable.Visible.

Prerender and NoStatePrefetch can be slower than a normal load at the tail.
i.e. the 95th percentile for first contentful paint is slower with prerender or prefetch than a normal load.

This only happens on desktop, and thus we suspect that the cause is the same as  https://crbug.com/652746  which was fixed only on Android.

 

Comment 1 by droger@chromium.org, Mar 28 2017

It's not completely clear why  bug 652746  would affect NoStatePrefetch, since a page load after NoStatePrefetch issues new requests. Maybe the cache lock is involved.

One suggested fix for prerender is to update the request priorities when the page becomes visible. Fixing the bug for prerender is not very important though, because prerender is being deprecated.
Project Member

Comment 2 by bugdroid1@chromium.org, Apr 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d3bc6148c7f0d2695ec2ca74652d996e2c4f5a6e

commit d3bc6148c7f0d2695ec2ca74652d996e2c4f5a6e
Author: droger <droger@chromium.org>
Date: Fri Apr 14 14:56:06 2017

[Prerender] Restore request priorities when swapped in

Requests from prerendered contents have a IDLE priority, in order not to slow
down visible pages.
However, when the prerendered contents become visible, the request priorities
were not reset back to their correct values, leading to bad prerendering
performance.

In this CL, the priority management for prerender requests is moved to the
PrerenderResourceThrottle/PrerendereContents.
The original priorities are stored in the throttle, and restored when the
prerender contents swaps in.
A new public function is added to ResourceDispatcherHost to update a request
priority, and its implementation reuses the existing code that updates the image
priorities.

The prerender contents keeps a list of all the network resources that were
started while the prerender is hidden. If this proves to be too large, pruning
the list when responses are received should be doable.

BUG= 705955 

Review-Url: https://codereview.chromium.org/2807163002
Cr-Commit-Position: refs/heads/master@{#464728}

[modify] https://crrev.com/d3bc6148c7f0d2695ec2ca74652d996e2c4f5a6e/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
[modify] https://crrev.com/d3bc6148c7f0d2695ec2ca74652d996e2c4f5a6e/chrome/browser/prerender/prerender_browsertest.cc
[modify] https://crrev.com/d3bc6148c7f0d2695ec2ca74652d996e2c4f5a6e/chrome/browser/prerender/prerender_contents.cc
[modify] https://crrev.com/d3bc6148c7f0d2695ec2ca74652d996e2c4f5a6e/chrome/browser/prerender/prerender_contents.h
[modify] https://crrev.com/d3bc6148c7f0d2695ec2ca74652d996e2c4f5a6e/chrome/browser/prerender/prerender_nostate_prefetch_browsertest.cc
[modify] https://crrev.com/d3bc6148c7f0d2695ec2ca74652d996e2c4f5a6e/chrome/browser/prerender/prerender_resource_throttle.cc
[modify] https://crrev.com/d3bc6148c7f0d2695ec2ca74652d996e2c4f5a6e/chrome/browser/prerender/prerender_resource_throttle.h
[modify] https://crrev.com/d3bc6148c7f0d2695ec2ca74652d996e2c4f5a6e/chrome/browser/prerender/prerender_test_utils.cc
[modify] https://crrev.com/d3bc6148c7f0d2695ec2ca74652d996e2c4f5a6e/chrome/browser/prerender/prerender_test_utils.h
[modify] https://crrev.com/d3bc6148c7f0d2695ec2ca74652d996e2c4f5a6e/content/browser/loader/resource_dispatcher_host_impl.cc
[modify] https://crrev.com/d3bc6148c7f0d2695ec2ca74652d996e2c4f5a6e/content/browser/loader/resource_dispatcher_host_impl.h
[modify] https://crrev.com/d3bc6148c7f0d2695ec2ca74652d996e2c4f5a6e/content/browser/loader/resource_scheduler.cc
[modify] https://crrev.com/d3bc6148c7f0d2695ec2ca74652d996e2c4f5a6e/content/browser/loader/resource_scheduler.h
[modify] https://crrev.com/d3bc6148c7f0d2695ec2ca74652d996e2c4f5a6e/content/public/browser/resource_dispatcher_host.h

Comment 3 by droger@chromium.org, Apr 19 2017

Labels: Merge-Request-59
This did not make the cut for M59, requesting merge since we're pretty early in the cycle.
Project Member

Comment 4 by sheriffbot@chromium.org, Apr 19 2017

Labels: -Merge-Request-59 Hotlist-Merge-Approved Merge-Approved-59
Your change meets the bar and is auto-approved for M59. Please go ahead and merge the CL to branch 3071 manually. Please contact milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), gkihumba@(ChromeOS), Abdul Syed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 5 by bugdroid1@chromium.org, Apr 19 2017

Labels: -merge-approved-59 merge-merged-3071
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d4b0c9f58ec981f98342cb8438da1a69bb489a06

commit d4b0c9f58ec981f98342cb8438da1a69bb489a06
Author: David Roger <droger@google.com>
Date: Wed Apr 19 13:23:35 2017

[Prerender] Restore request priorities when swapped in

Requests from prerendered contents have a IDLE priority, in order not to slow
down visible pages.
However, when the prerendered contents become visible, the request priorities
were not reset back to their correct values, leading to bad prerendering
performance.

In this CL, the priority management for prerender requests is moved to the
PrerenderResourceThrottle/PrerendereContents.
The original priorities are stored in the throttle, and restored when the
prerender contents swaps in.
A new public function is added to ResourceDispatcherHost to update a request
priority, and its implementation reuses the existing code that updates the image
priorities.

The prerender contents keeps a list of all the network resources that were
started while the prerender is hidden. If this proves to be too large, pruning
the list when responses are received should be doable.

BUG= 705955 

Review-Url: https://codereview.chromium.org/2807163002
Cr-Commit-Position: refs/heads/master@{#464728}
(cherry picked from commit d3bc6148c7f0d2695ec2ca74652d996e2c4f5a6e)

Review-Url: https://codereview.chromium.org/2832473002 .
Cr-Commit-Position: refs/branch-heads/3071@{#48}
Cr-Branched-From: a106f0abbf69dad349d4aaf4bcc4f5d376dd2377-refs/heads/master@{#464641}

[modify] https://crrev.com/d4b0c9f58ec981f98342cb8438da1a69bb489a06/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
[modify] https://crrev.com/d4b0c9f58ec981f98342cb8438da1a69bb489a06/chrome/browser/prerender/prerender_browsertest.cc
[modify] https://crrev.com/d4b0c9f58ec981f98342cb8438da1a69bb489a06/chrome/browser/prerender/prerender_contents.cc
[modify] https://crrev.com/d4b0c9f58ec981f98342cb8438da1a69bb489a06/chrome/browser/prerender/prerender_contents.h
[modify] https://crrev.com/d4b0c9f58ec981f98342cb8438da1a69bb489a06/chrome/browser/prerender/prerender_nostate_prefetch_browsertest.cc
[modify] https://crrev.com/d4b0c9f58ec981f98342cb8438da1a69bb489a06/chrome/browser/prerender/prerender_resource_throttle.cc
[modify] https://crrev.com/d4b0c9f58ec981f98342cb8438da1a69bb489a06/chrome/browser/prerender/prerender_resource_throttle.h
[modify] https://crrev.com/d4b0c9f58ec981f98342cb8438da1a69bb489a06/chrome/browser/prerender/prerender_test_utils.cc
[modify] https://crrev.com/d4b0c9f58ec981f98342cb8438da1a69bb489a06/chrome/browser/prerender/prerender_test_utils.h
[modify] https://crrev.com/d4b0c9f58ec981f98342cb8438da1a69bb489a06/content/browser/loader/resource_dispatcher_host_impl.cc
[modify] https://crrev.com/d4b0c9f58ec981f98342cb8438da1a69bb489a06/content/browser/loader/resource_dispatcher_host_impl.h
[modify] https://crrev.com/d4b0c9f58ec981f98342cb8438da1a69bb489a06/content/browser/loader/resource_scheduler.cc
[modify] https://crrev.com/d4b0c9f58ec981f98342cb8438da1a69bb489a06/content/browser/loader/resource_scheduler.h
[modify] https://crrev.com/d4b0c9f58ec981f98342cb8438da1a69bb489a06/content/public/browser/resource_dispatcher_host.h

Project Member

Comment 6 by bugdroid1@chromium.org, Apr 19 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e8cd36ed2928f6e667386a687068e6a1de4124fe

commit e8cd36ed2928f6e667386a687068e6a1de4124fe
Author: ojan <ojan@chromium.org>
Date: Wed Apr 19 18:23:28 2017

Revert of [Prerender] Restore request priorities when swapped in (patchset #1 id:1 of https://codereview.chromium.org/2832473002/ )

Reason for revert:
Caused compile failures on Mac and Windows Beta official desktop continuous waterfall.

https://bugs.chromium.org/p/chromium/issues/detail?id=713223

Original issue's description:
> [Prerender] Restore request priorities when swapped in
>
> Requests from prerendered contents have a IDLE priority, in order not to slow
> down visible pages.
> However, when the prerendered contents become visible, the request priorities
> were not reset back to their correct values, leading to bad prerendering
> performance.
>
> In this CL, the priority management for prerender requests is moved to the
> PrerenderResourceThrottle/PrerendereContents.
> The original priorities are stored in the throttle, and restored when the
> prerender contents swaps in.
> A new public function is added to ResourceDispatcherHost to update a request
> priority, and its implementation reuses the existing code that updates the image
> priorities.
>
> The prerender contents keeps a list of all the network resources that were
> started while the prerender is hidden. If this proves to be too large, pruning
> the list when responses are received should be doable.
>
> BUG= 705955 
>
> Review-Url: https://codereview.chromium.org/2807163002
> Cr-Commit-Position: refs/heads/master@{#464728}
> (cherry picked from commit d3bc6148c7f0d2695ec2ca74652d996e2c4f5a6e)
>
> Review-Url: https://codereview.chromium.org/2832473002 .
> Cr-Commit-Position: refs/branch-heads/3071@{#48}
> Cr-Branched-From: a106f0abbf69dad349d4aaf4bcc4f5d376dd2377-refs/heads/master@{#464641}
> Committed: https://chromium.googlesource.com/chromium/src/+/d4b0c9f58ec981f98342cb8438da1a69bb489a06

TBR=droger@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= 705955 

Review-Url: https://codereview.chromium.org/2833553002
Cr-Commit-Position: refs/branch-heads/3071@{#58}
Cr-Branched-From: a106f0abbf69dad349d4aaf4bcc4f5d376dd2377-refs/heads/master@{#464641}

[modify] https://crrev.com/e8cd36ed2928f6e667386a687068e6a1de4124fe/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
[modify] https://crrev.com/e8cd36ed2928f6e667386a687068e6a1de4124fe/chrome/browser/prerender/prerender_browsertest.cc
[modify] https://crrev.com/e8cd36ed2928f6e667386a687068e6a1de4124fe/chrome/browser/prerender/prerender_contents.cc
[modify] https://crrev.com/e8cd36ed2928f6e667386a687068e6a1de4124fe/chrome/browser/prerender/prerender_contents.h
[modify] https://crrev.com/e8cd36ed2928f6e667386a687068e6a1de4124fe/chrome/browser/prerender/prerender_nostate_prefetch_browsertest.cc
[modify] https://crrev.com/e8cd36ed2928f6e667386a687068e6a1de4124fe/chrome/browser/prerender/prerender_resource_throttle.cc
[modify] https://crrev.com/e8cd36ed2928f6e667386a687068e6a1de4124fe/chrome/browser/prerender/prerender_resource_throttle.h
[modify] https://crrev.com/e8cd36ed2928f6e667386a687068e6a1de4124fe/chrome/browser/prerender/prerender_test_utils.cc
[modify] https://crrev.com/e8cd36ed2928f6e667386a687068e6a1de4124fe/chrome/browser/prerender/prerender_test_utils.h
[modify] https://crrev.com/e8cd36ed2928f6e667386a687068e6a1de4124fe/content/browser/loader/resource_dispatcher_host_impl.cc
[modify] https://crrev.com/e8cd36ed2928f6e667386a687068e6a1de4124fe/content/browser/loader/resource_dispatcher_host_impl.h
[modify] https://crrev.com/e8cd36ed2928f6e667386a687068e6a1de4124fe/content/browser/loader/resource_scheduler.cc
[modify] https://crrev.com/e8cd36ed2928f6e667386a687068e6a1de4124fe/content/browser/loader/resource_scheduler.h
[modify] https://crrev.com/e8cd36ed2928f6e667386a687068e6a1de4124fe/content/public/browser/resource_dispatcher_host.h

Project Member

Comment 7 by bugdroid1@chromium.org, Apr 20 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9440a43cf4f1526f263f187d0d369e80f8615b35

commit 9440a43cf4f1526f263f187d0d369e80f8615b35
Author: David Roger <droger@google.com>
Date: Thu Apr 20 15:53:54 2017

[Prerender] Restore request priorities when swapped in

Requests from prerendered contents have a IDLE priority, in order not to slow
down visible pages.
However, when the prerendered contents become visible, the request priorities
were not reset back to their correct values, leading to bad prerendering
performance.

In this CL, the priority management for prerender requests is moved to the
PrerenderResourceThrottle/PrerendereContents.
The original priorities are stored in the throttle, and restored when the
prerender contents swaps in.
A new public function is added to ResourceDispatcherHost to update a request
priority, and its implementation reuses the existing code that updates the image
priorities.

The prerender contents keeps a list of all the network resources that were
started while the prerender is hidden. If this proves to be too large, pruning
the list when responses are received should be doable.

BUG= 705955 

Review-Url: https://codereview.chromium.org/2807163002
Cr-Commit-Position: refs/heads/master@{#464728}
(cherry picked from commit d3bc6148c7f0d2695ec2ca74652d996e2c4f5a6e)

Review-Url: https://codereview.chromium.org/2826223005 .
Cr-Commit-Position: refs/branch-heads/3071@{#83}
Cr-Branched-From: a106f0abbf69dad349d4aaf4bcc4f5d376dd2377-refs/heads/master@{#464641}

[modify] https://crrev.com/9440a43cf4f1526f263f187d0d369e80f8615b35/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
[modify] https://crrev.com/9440a43cf4f1526f263f187d0d369e80f8615b35/chrome/browser/prerender/prerender_browsertest.cc
[modify] https://crrev.com/9440a43cf4f1526f263f187d0d369e80f8615b35/chrome/browser/prerender/prerender_contents.cc
[modify] https://crrev.com/9440a43cf4f1526f263f187d0d369e80f8615b35/chrome/browser/prerender/prerender_contents.h
[modify] https://crrev.com/9440a43cf4f1526f263f187d0d369e80f8615b35/chrome/browser/prerender/prerender_nostate_prefetch_browsertest.cc
[modify] https://crrev.com/9440a43cf4f1526f263f187d0d369e80f8615b35/chrome/browser/prerender/prerender_resource_throttle.cc
[modify] https://crrev.com/9440a43cf4f1526f263f187d0d369e80f8615b35/chrome/browser/prerender/prerender_resource_throttle.h
[modify] https://crrev.com/9440a43cf4f1526f263f187d0d369e80f8615b35/chrome/browser/prerender/prerender_test_utils.cc
[modify] https://crrev.com/9440a43cf4f1526f263f187d0d369e80f8615b35/chrome/browser/prerender/prerender_test_utils.h
[modify] https://crrev.com/9440a43cf4f1526f263f187d0d369e80f8615b35/content/browser/loader/resource_dispatcher_host_impl.cc
[modify] https://crrev.com/9440a43cf4f1526f263f187d0d369e80f8615b35/content/browser/loader/resource_dispatcher_host_impl.h
[modify] https://crrev.com/9440a43cf4f1526f263f187d0d369e80f8615b35/content/browser/loader/resource_scheduler.cc
[modify] https://crrev.com/9440a43cf4f1526f263f187d0d369e80f8615b35/content/browser/loader/resource_scheduler.h
[modify] https://crrev.com/9440a43cf4f1526f263f187d0d369e80f8615b35/content/public/browser/resource_dispatcher_host.h

Fixed?

Comment 9 by pasko@chromium.org, Aug 16 2017

Status: Fixed (was: Started)

Sign in to add a comment