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

Issue 828416 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jul 10
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Move UseCounter to DocumentLoader to prevent usage loss

Project Member Reported by loonyb...@chromium.org, Apr 3 2018

Issue description

Some features are sent from blink to PageLoadMetricsObserver (PLMO) before a document commits. PLMOs require that features are only sent after commit, so these features observed before commit are currently lost. For example, the data URI contains octothorpe (WebFeature::kDataUriHasOctothorpe) is recorded as part of parsing the main document resource, which happens before commit for data URIs.

A proposal is to move UseCounter from Page to DocumentLoader and buffer pre-loading features until commit time and send features to the browser side then.

 
Project Member

Comment 1 by bugdroid1@chromium.org, Jul 10

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

commit c97e35c2ca0bf62c7082e3550c62c82def3ef186
Author: Luna Lu <loonybear@chromium.org>
Date: Tue Jul 10 21:17:52 2018

Moving UseCounter from Page to DocumentLoader

UseCounter is sending usage to the browser side page load metrics to
accurately record usage per page load. However, page load metrics
observer is only created after navigation commits. This means pre-
loading features could lose some usage. We would love to buffer the
pre-loading features and resend to the browser side upon commit.
Page is a challenging place to achieve so since a Page can have
multiple page load, it is hard to know where exactly to reset the
buffer. Therefore, DocumentLoader seems to be a better fit for that.

Design doc: https://docs.google.com/document/d/1yuJ8iPCFPZ5-vZJ30lgc2J8c4Olo2SqfLPY8KXfkRJU/edit
This CL is based on this CL https://chromium-review.googlesource.com/c/chromium/src/+/1100972

Change-Id: If3d52a766db0cd573e4e139f552a49edcf0f90f2

Bug:  828416 , 855042
Change-Id: If3d52a766db0cd573e4e139f552a49edcf0f90f2
Reviewed-on: https://chromium-review.googlesource.com/1079787
Commit-Queue: Luna Lu <loonybear@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Nate Chapin <japhet@chromium.org>
Cr-Commit-Position: refs/heads/master@{#573909}
[modify] https://crrev.com/c97e35c2ca0bf62c7082e3550c62c82def3ef186/third_party/WebKit/LayoutTests/svg/as-image/svgview-references-use-counters-expected.txt
[modify] https://crrev.com/c97e35c2ca0bf62c7082e3550c62c82def3ef186/third_party/WebKit/LayoutTests/svg/as-image/svgview-references-use-counters.html
[add] https://crrev.com/c97e35c2ca0bf62c7082e3550c62c82def3ef186/third_party/WebKit/LayoutTests/virtual/service-worker-servicification/http/tests/serviceworker/navigation_preload/use-counter-expected.txt
[modify] https://crrev.com/c97e35c2ca0bf62c7082e3550c62c82def3ef186/third_party/blink/renderer/bindings/core/v8/binding_security_test.cc
[modify] https://crrev.com/c97e35c2ca0bf62c7082e3550c62c82def3ef186/third_party/blink/renderer/core/css/parser/css_lazy_parsing_test.cc
[modify] https://crrev.com/c97e35c2ca0bf62c7082e3550c62c82def3ef186/third_party/blink/renderer/core/css/parser/css_parser_context.cc
[modify] https://crrev.com/c97e35c2ca0bf62c7082e3550c62c82def3ef186/third_party/blink/renderer/core/dom/document.cc
[modify] https://crrev.com/c97e35c2ca0bf62c7082e3550c62c82def3ef186/third_party/blink/renderer/core/frame/deprecation.cc
[modify] https://crrev.com/c97e35c2ca0bf62c7082e3550c62c82def3ef186/third_party/blink/renderer/core/frame/deprecation.h
[modify] https://crrev.com/c97e35c2ca0bf62c7082e3550c62c82def3ef186/third_party/blink/renderer/core/frame/local_frame.cc
[modify] https://crrev.com/c97e35c2ca0bf62c7082e3550c62c82def3ef186/third_party/blink/renderer/core/frame/use_counter.cc
[modify] https://crrev.com/c97e35c2ca0bf62c7082e3550c62c82def3ef186/third_party/blink/renderer/core/frame/use_counter.h
[modify] https://crrev.com/c97e35c2ca0bf62c7082e3550c62c82def3ef186/third_party/blink/renderer/core/frame/use_counter_test.cc
[modify] https://crrev.com/c97e35c2ca0bf62c7082e3550c62c82def3ef186/third_party/blink/renderer/core/html/html_iframe_element.cc
[modify] https://crrev.com/c97e35c2ca0bf62c7082e3550c62c82def3ef186/third_party/blink/renderer/core/inspector/main_thread_debugger.cc
[modify] https://crrev.com/c97e35c2ca0bf62c7082e3550c62c82def3ef186/third_party/blink/renderer/core/loader/document_loader.cc
[modify] https://crrev.com/c97e35c2ca0bf62c7082e3550c62c82def3ef186/third_party/blink/renderer/core/loader/document_loader.h
[modify] https://crrev.com/c97e35c2ca0bf62c7082e3550c62c82def3ef186/third_party/blink/renderer/core/loader/frame_fetch_context.cc
[modify] https://crrev.com/c97e35c2ca0bf62c7082e3550c62c82def3ef186/third_party/blink/renderer/core/page/page.cc
[modify] https://crrev.com/c97e35c2ca0bf62c7082e3550c62c82def3ef186/third_party/blink/renderer/core/page/page.h
[modify] https://crrev.com/c97e35c2ca0bf62c7082e3550c62c82def3ef186/third_party/blink/renderer/core/testing/internals.cc

Status: Fixed (was: Assigned)

Sign in to add a comment