New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 820031 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac , Fuchsia
Pri: 2
Type: Bug



Sign in to add a comment

NavigationMojoResponse: Navigation.ReadyToCommitUntilCommit regression. ContinueForNavigation() should be called directly.

Project Member Reported by arthurso...@chromium.org, Mar 8 2018

Issue description

With NavigationMojoResponse, we are seeing a performance regression for the histogram "Navigation.ReadyToCommitUntilCommit".
https://uma.googleplex.com/p/chrome/variations/?sid=98caa0bc0fde83878e3387974bbc3582

One cause is ResourceDispatcher::ContinueForNavigation() being called in a PostTask() when it could be called in the same execution sequence. If the renderer is busy, the navigation commit may be delayed.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Mar 8 2018

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

commit fe32eb20fb71e7e4c8dcc5544cc342c45b7de437
Author: arthursonzogni <arthursonzogni@chromium.org>
Date: Thu Mar 08 13:34:08 2018

Call ContinueForNavigation() earlier.

With NavigationMojoResponse, we are seeing a regression in
Navigation.ReadyToCommitUntilCommit. The method ContinueForNavigation()
is called in a PostTask(). In a busy renderer, it causes the loading of
the main resource to be delayed.

This CL replaces the PostTask by a callback that is called at the end of
RenderFrameImpl::CommitNavigation(). According to local benchmarks, it
should improve the histogram mentionned above (see below).

Links to collaboratory studies:
 * Without patch: https://goo.gl/isFY17
 * With path: https://goo.gl/xWAjqB

Bug:  705744 ,  820031 
Change-Id: I4cac025f74865bf164d618d2afbd92bceeaede1e
Reviewed-on: https://chromium-review.googlesource.com/951243
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Camille Lamy <clamy@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541783}
[modify] https://crrev.com/fe32eb20fb71e7e4c8dcc5544cc342c45b7de437/content/renderer/loader/request_extra_data.h
[modify] https://crrev.com/fe32eb20fb71e7e4c8dcc5544cc342c45b7de437/content/renderer/loader/resource_dispatcher.cc
[modify] https://crrev.com/fe32eb20fb71e7e4c8dcc5544cc342c45b7de437/content/renderer/loader/resource_dispatcher.h
[modify] https://crrev.com/fe32eb20fb71e7e4c8dcc5544cc342c45b7de437/content/renderer/loader/resource_dispatcher_unittest.cc
[modify] https://crrev.com/fe32eb20fb71e7e4c8dcc5544cc342c45b7de437/content/renderer/loader/sync_load_context.cc
[modify] https://crrev.com/fe32eb20fb71e7e4c8dcc5544cc342c45b7de437/content/renderer/loader/url_loader_client_impl_unittest.cc
[modify] https://crrev.com/fe32eb20fb71e7e4c8dcc5544cc342c45b7de437/content/renderer/loader/url_response_body_consumer_unittest.cc
[modify] https://crrev.com/fe32eb20fb71e7e4c8dcc5544cc342c45b7de437/content/renderer/loader/web_url_loader_impl.cc
[modify] https://crrev.com/fe32eb20fb71e7e4c8dcc5544cc342c45b7de437/content/renderer/loader/web_url_loader_impl_unittest.cc
[modify] https://crrev.com/fe32eb20fb71e7e4c8dcc5544cc342c45b7de437/content/renderer/render_frame_impl.cc

Components: UI>Browser>Navigation Blink>Loader
Labels: Merge-Request-66
Status: Fixed (was: Started)
The performance regression on Navigation.Renderer.ReadyToCommitUntilCommit and its derivatives with NavigationMojoResponse is fixed by the patch in comment #2. It looks like there is even an improvement.
Even if I have only data for 1-2 days on M67 canary, the improvement is big enough to have statistically significance.

Please see the histograms:
* Before the patch: https://uma.googleplex.com/p/chrome/variations/?sid=c808c5b1a40974c2c71a798de5cbbf9a
* After  the patch: https://uma.googleplex.com/p/chrome/variations/?sid=e1ab182689e68e090b0fac526501b655

I would like being able to merge this patch. That would allow the NavigationMojoResponse experiment to go on beta.
Risk is low. The patch is simple. Instead of calling one function in a PostTask(), it gets called directly at the right moment instead of being delayed. This function is not used without NavigationMojoResponse, so there is no impact on the old code path. The worse that may happen is being forced to switch off NavigationMojoResponse with finch.
Labels: -Merge-Request-66 Merge-Approved-66
Approving merge for M66. Branch:3359
Project Member

Comment 4 by bugdroid1@chromium.org, Mar 14 2018

Labels: -merge-approved-66 merge-merged-3359
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cd520a223d55976ce77b132ae97262afaa559bd6

commit cd520a223d55976ce77b132ae97262afaa559bd6
Author: arthursonzogni <arthursonzogni@chromium.org>
Date: Wed Mar 14 19:12:57 2018

Call ContinueForNavigation() earlier (M66 merge).

With NavigationMojoResponse, we are seeing a regression in
Navigation.ReadyToCommitUntilCommit. The method ContinueForNavigation()
is called in a PostTask(). In a busy renderer, it causes the loading of
the main resource to be delayed.

This CL replaces the PostTask by a callback that is called at the end of
RenderFrameImpl::CommitNavigation(). According to local benchmarks, it
should improve the histogram mentionned above (see below).

Links to collaboratory studies:
 * Without patch: https://goo.gl/isFY17
 * With path: https://goo.gl/xWAjqB

Bug:  705744 ,  820031 
Change-Id: I4cac025f74865bf164d618d2afbd92bceeaede1e
Reviewed-on: https://chromium-review.googlesource.com/951243
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Camille Lamy <clamy@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#541783}(cherry picked from commit fe32eb20fb71e7e4c8dcc5544cc342c45b7de437)
Reviewed-on: https://chromium-review.googlesource.com/962481
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Cr-Commit-Position: refs/branch-heads/3359@{#238}
Cr-Branched-From: 66afc5e5d10127546cc4b98b9117aff588b5e66b-refs/heads/master@{#540276}
[modify] https://crrev.com/cd520a223d55976ce77b132ae97262afaa559bd6/content/renderer/loader/request_extra_data.h
[modify] https://crrev.com/cd520a223d55976ce77b132ae97262afaa559bd6/content/renderer/loader/resource_dispatcher.cc
[modify] https://crrev.com/cd520a223d55976ce77b132ae97262afaa559bd6/content/renderer/loader/resource_dispatcher.h
[modify] https://crrev.com/cd520a223d55976ce77b132ae97262afaa559bd6/content/renderer/loader/resource_dispatcher_unittest.cc
[modify] https://crrev.com/cd520a223d55976ce77b132ae97262afaa559bd6/content/renderer/loader/sync_load_context.cc
[modify] https://crrev.com/cd520a223d55976ce77b132ae97262afaa559bd6/content/renderer/loader/url_loader_client_impl_unittest.cc
[modify] https://crrev.com/cd520a223d55976ce77b132ae97262afaa559bd6/content/renderer/loader/url_response_body_consumer_unittest.cc
[modify] https://crrev.com/cd520a223d55976ce77b132ae97262afaa559bd6/content/renderer/loader/web_url_loader_impl.cc
[modify] https://crrev.com/cd520a223d55976ce77b132ae97262afaa559bd6/content/renderer/loader/web_url_loader_impl_unittest.cc
[modify] https://crrev.com/cd520a223d55976ce77b132ae97262afaa559bd6/content/renderer/render_frame_impl.cc

Sign in to add a comment