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

Issue 810413 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , iOS , Mac
Pri: 1
Type: Bug



Sign in to add a comment

UseCounter counts top result from Google search as a PageVisit

Project Member Reported by loonyb...@chromium.org, Feb 8 2018

Issue description

Example link: 
https://www.google.ca/search?q=quora&oq=quora&aqs=chrome..69i57j0l5.5296j0j7&sourceid=chrome&ie=UTF-8
(a search for quora on Google search)
Observed: kPageVisits logged on "https://www.quora.com/" on the renderer side

Suspect cause: 
<link href="https://www.quora.com/" rel="prerender">
This prerender link is found in the page source. The "prerender" is likely causing stuff happening on the renderer side but blocked on the browser side.

 
Description: Show this description
Cc: pasko@chromium.org droger@chromium.org mattcary@chromium.org
Hi pasko, droger, and mattcary, we are supposed to disable pre-rendering right? But currently I am observing UseCounter PageVisits (called from Page::DidCommitLoad) caused by pre-rendering. 

I would like to drop all the UseCounters on pre-rendering. Could you please point me at some possible solution to fix this?

Thanks
Components: Blink

Comment 4 by pasko@chromium.org, Feb 8 2018

Status: Available (was: Untriaged)
Right, seems that the nostate-prefetch that uses a bit of prerender mechanics would register these counts. We can avoid recording the count from Page::DidCommitLoad when Document::IsPrefetchOnly() returns true. I am no Blink expert, do you think it would work?
That seems like an easy feasible fix. I will try it locally and get back to you shortly.

Thanks pasko!
Thanks for investigating this!

I think we want to avoid treating these nostate-prefetch loads as page loads in all page load metrics. IIUC these nostate prefetch loads are just to warm cache & would not actually ever be used to show a real page load to a user (like traditional prerender would). Is that right? In other words if we do a nostate prefetch and the user then navigates to that page, we'd start a whole new page load for the user initiated nav.

If this is right, is there a way to filter these out on the browser side, if we have a pointer to the hosting WebContents available?
https://chromium-review.googlesource.com/c/chromium/src/+/909230

verified locally, it works as expected :)

Comment 8 by pasko@chromium.org, Feb 8 2018

Owner: loonyb...@chromium.org
Status: Started (was: Available)
> IIUC these nostate prefetch loads are just to warm cache & would not actually
> ever be used to show a real page load to a user (like traditional prerender
> would). Is that right?

Yes.
I tried to observe this on the browser side PageLoadMetricsObserver, I didn't see any pre-fetch triggering PageLoadMetricsObserver::OnCommit(). But maybe we could write a browser test on PageLoadMetricsObserver to confirm that this is the case. WDYT Bryan?

Comment 10 by e...@chromium.org, Feb 8 2018

Components: -Blink
Project Member

Comment 11 by bugdroid1@chromium.org, Feb 8 2018

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

commit 68d14ccce9c35de5565d957528953e85b9be7c62
Author: Luna Lu <loonybear@chromium.org>
Date: Thu Feb 08 20:20:05 2018

Drop UseCounter on pre-rendering pages

Bug:  810413 
Change-Id: I978d1c4b752bac6e466cb94aa58a6b064ba08633
Reviewed-on: https://chromium-review.googlesource.com/909230
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Commit-Queue: Luna Lu <loonybear@chromium.org>
Cr-Commit-Position: refs/heads/master@{#535488}
[modify] https://crrev.com/68d14ccce9c35de5565d957528953e85b9be7c62/third_party/WebKit/Source/core/frame/UseCounter.cpp

Labels: Merge-Request-65
I would like to get this fix merged so that I can collect new results on UseCounter ASAP
Thanks
Pls apply appropriate OSs label. Thank you.
Labels: OS-Android OS-iOS OS-Linux OS-Mac OS-Windows
Sorry about that, thanks Krishna :) 
Project Member

Comment 16 by sheriffbot@chromium.org, Feb 8 2018

Labels: -Merge-Request-65 Merge-Review-65 Hotlist-Merge-Review
This bug requires manual review: Less than 22 days to go before AppStore submit on M65
Please contact the milestone owner if you have questions.
Owners: cmasso@(Android), cmasso@(iOS), bhthompson@(ChromeOS), govind@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
This feature touches UseCounter, which collects feature usage in the web (please see https://www.chromestatus.com/metrics/feature/popularity). The feature usage is calculated as (feature counts/ pagevisits). 

The current behaviour is wrong (pagevisits is inflated). So the public result is also wrong.

In addition, I am in the process of migrating the UseCounter from the renderer side to the browser side. The way of justify that the browser side UseCounter works as expected is by comparing its stats with the renderer side. So the earlier I can merge this fix, the sooner I can collect "correct" data from the renderer side usecounter to compare the browser side data against. OOPIFs is going to be enabled everywhere, I'd like to be able to verify the result before OOPIF is out, cause that will make things harder to justify.


Thanks 

In addition, this is an internal feature and doesn't affect the web.
I will verify the bug tomorrow on canary too.
Awesome, thank you Luna!
Verified on Chrome Canary on mac (version 66.0.3344.0), works as expected.
Unable to verify on Linux since the current version is still in 65
Labels: -Merge-Review-65 Merge-Approved-65
Thank you Luna.

Approving merge to M65 branch 3325 based on comments #17, #18 and #20. 
Status: Fixed (was: Started)
Thanks everyone for your help!
Status: Started (was: Fixed)
Project Member

Comment 24 by bugdroid1@chromium.org, Feb 9 2018

Labels: -merge-approved-65 merge-merged-3325
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/85128c21c8f1cfd2b0fe9c6ac43793e6656d2b7d

commit 85128c21c8f1cfd2b0fe9c6ac43793e6656d2b7d
Author: Luna Lu <loonybear@chromium.org>
Date: Fri Feb 09 21:19:15 2018

Drop UseCounter on pre-rendering pages

Bug:  810413 
Change-Id: I978d1c4b752bac6e466cb94aa58a6b064ba08633
Reviewed-on: https://chromium-review.googlesource.com/909230
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Commit-Queue: Luna Lu <loonybear@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#535488}(cherry picked from commit 68d14ccce9c35de5565d957528953e85b9be7c62)
Reviewed-on: https://chromium-review.googlesource.com/912110
Reviewed-by: Luna Lu <loonybear@chromium.org>
Cr-Commit-Position: refs/branch-heads/3325@{#412}
Cr-Branched-From: bc084a8b5afa3744a74927344e304c02ae54189f-refs/heads/master@{#530369}
[modify] https://crrev.com/85128c21c8f1cfd2b0fe9c6ac43793e6656d2b7d/third_party/WebKit/Source/core/frame/UseCounter.cpp

Status: Fixed (was: Started)

Sign in to add a comment