Reduce overhead of adding client hints [chromium/src : main]

0 views
Skip to first unread message

Patrick Meenan (Gerrit)

unread,
May 14, 2026, 7:31:08β€―PMΒ (5 days ago)Β May 14
to Yoav Weiss (@Shopify), Chromium LUCI CQ, chromium...@chromium.org, Nate Chapin, blink-...@chromium.org, gavinp...@chromium.org, loading...@chromium.org
Attention needed from Yoav Weiss (@Shopify)

Patrick Meenan added 1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Patrick Meenan . resolved

yoav@ could you PTAL when you get a chance since client hints is something you've been heavily involved in?

Open in Gerrit

Related details

Attention is currently required from:
  • Yoav Weiss (@Shopify)
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I64423ed4dba0f2ef1148213fa8080137ffa71b96
Gerrit-Change-Number: 7851236
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Meenan <pme...@chromium.org>
Gerrit-Reviewer: Patrick Meenan <pme...@chromium.org>
Gerrit-Reviewer: Yoav Weiss (@Shopify) <yoav...@chromium.org>
Gerrit-CC: Nate Chapin <jap...@chromium.org>
Gerrit-Attention: Yoav Weiss (@Shopify) <yoav...@chromium.org>
Gerrit-Comment-Date: Thu, 14 May 2026 23:31:02 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

AI Code Reviewer (Gerrit)

unread,
May 14, 2026, 7:32:27β€―PMΒ (5 days ago)Β May 14
to Patrick Meenan, Yoav Weiss (@Shopify), Chromium LUCI CQ, chromium...@chromium.org, Nate Chapin, blink-...@chromium.org, gavinp...@chromium.org, loading...@chromium.org
Attention needed from Yoav Weiss (@Shopify)

AI Code Reviewer added 1 comment

File third_party/blink/renderer/core/loader/frame_fetch_context.h
Line 254, Patchset 1 (Latest): // https://crbug.com/512514655
AI Code Reviewer . unresolved

nit: Blink Style Guide: Naming - Precede boolean values with words like β€œis” and β€œdid”. Consider renaming this member variable to 'is_fast_memory_cache_with_devtools_enabled_'.

To keep this interaction as brief and non-intrusive as possible, please consider responding with one of following options:
**Done** | **OK But Won't Fix**: reason | **Later**: b/<bug_id> | **Invalid:** reason


_This comment was generated by [Experimental Blink C++ Code Review Agent](http://go/blink-c++-code-review-agent)._
_AI reviews can sometimes be inaccurate; We appreciate your πŸ™ feedback πŸ™ to help us improve._
_[File a bug](http://go/blink-c++-code-review-agent-feedback) | [Provide feedback on chat](https://chat.google.com/room/AAQA0zhQHe0?cls=4) | [Opt-out](https://ganpati2.corp.google.com/group/peep-genai-blink-agent-optout.prod)_

Open in Gerrit

Related details

Attention is currently required from:
  • Yoav Weiss (@Shopify)
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I64423ed4dba0f2ef1148213fa8080137ffa71b96
    Gerrit-Change-Number: 7851236
    Gerrit-PatchSet: 1
    Gerrit-Owner: Patrick Meenan <pme...@chromium.org>
    Gerrit-Reviewer: Patrick Meenan <pme...@chromium.org>
    Gerrit-Reviewer: Yoav Weiss (@Shopify) <yoav...@chromium.org>
    Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
    Gerrit-CC: Nate Chapin <jap...@chromium.org>
    Gerrit-Attention: Yoav Weiss (@Shopify) <yoav...@chromium.org>
    Gerrit-Comment-Date: Thu, 14 May 2026 23:32:24 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Yoav Weiss (@Shopify) (Gerrit)

    unread,
    May 19, 2026, 1:39:20β€―AMΒ (yesterday)Β May 19
    to Patrick Meenan, AI Code Reviewer, Chromium LUCI CQ, chromium...@chromium.org, Nate Chapin, blink-...@chromium.org, gavinp...@chromium.org, loading...@chromium.org
    Attention needed from Patrick Meenan

    Yoav Weiss (@Shopify) voted and added 1 comment

    Votes added by Yoav Weiss (@Shopify)

    Code-Review+1

    1 comment

    Patchset-level comments
    Yoav Weiss (@Shopify) . resolved

    LGTM

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Patrick Meenan
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I64423ed4dba0f2ef1148213fa8080137ffa71b96
    Gerrit-Change-Number: 7851236
    Gerrit-PatchSet: 1
    Gerrit-Owner: Patrick Meenan <pme...@chromium.org>
    Gerrit-Reviewer: Patrick Meenan <pme...@chromium.org>
    Gerrit-Reviewer: Yoav Weiss (@Shopify) <yoav...@chromium.org>
    Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
    Gerrit-CC: Nate Chapin <jap...@chromium.org>
    Gerrit-Attention: Patrick Meenan <pme...@chromium.org>
    Gerrit-Comment-Date: Tue, 19 May 2026 05:38:59 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Patrick Meenan (Gerrit)

    unread,
    May 19, 2026, 7:40:44β€―AMΒ (20 hours ago)Β May 19
    to Yoav Weiss (@Shopify), AI Code Reviewer, Chromium LUCI CQ, chromium...@chromium.org, Nate Chapin, blink-...@chromium.org, gavinp...@chromium.org, loading...@chromium.org

    Patrick Meenan added 1 comment

    File third_party/blink/renderer/core/loader/frame_fetch_context.h

    nit: Blink Style Guide: Naming - Precede boolean values with words like β€œis” and β€œdid”. Consider renaming this member variable to 'is_fast_memory_cache_with_devtools_enabled_'.

    To keep this interaction as brief and non-intrusive as possible, please consider responding with one of following options:
    **Done** | **OK But Won't Fix**: reason | **Later**: b/<bug_id> | **Invalid:** reason


    _This comment was generated by [Experimental Blink C++ Code Review Agent](http://go/blink-c++-code-review-agent)._
    _AI reviews can sometimes be inaccurate; We appreciate your πŸ™ feedback πŸ™ to help us improve._
    _[File a bug](http://go/blink-c++-code-review-agent-feedback) | [Provide feedback on chat](https://chat.google.com/room/AAQA0zhQHe0?cls=4) | [Opt-out](https://ganpati2.corp.google.com/group/peep-genai-blink-agent-optout.prod)_

    Patrick Meenan

    Done

    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I64423ed4dba0f2ef1148213fa8080137ffa71b96
      Gerrit-Change-Number: 7851236
      Gerrit-PatchSet: 2
      Gerrit-Owner: Patrick Meenan <pme...@chromium.org>
      Gerrit-Reviewer: Patrick Meenan <pme...@chromium.org>
      Gerrit-Reviewer: Yoav Weiss (@Shopify) <yoav...@chromium.org>
      Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
      Gerrit-CC: Nate Chapin <jap...@chromium.org>
      Gerrit-Comment-Date: Tue, 19 May 2026 11:40:35 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
      satisfied_requirement
      open
      diffy

      Patrick Meenan (Gerrit)

      unread,
      May 19, 2026, 9:10:12β€―AMΒ (18 hours ago)Β May 19
      to Yoav Weiss (@Shopify), AI Code Reviewer, Chromium LUCI CQ, chromium...@chromium.org, Nate Chapin, blink-...@chromium.org, gavinp...@chromium.org, loading...@chromium.org

      Patrick Meenan voted Commit-Queue+2

      Commit-Queue+2
      Open in Gerrit

      Related details

      Attention set is empty
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I64423ed4dba0f2ef1148213fa8080137ffa71b96
      Gerrit-Change-Number: 7851236
      Gerrit-PatchSet: 3
      Gerrit-Owner: Patrick Meenan <pme...@chromium.org>
      Gerrit-Reviewer: Patrick Meenan <pme...@chromium.org>
      Gerrit-Reviewer: Yoav Weiss (@Shopify) <yoav...@chromium.org>
      Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
      Gerrit-CC: Nate Chapin <jap...@chromium.org>
      Gerrit-Comment-Date: Tue, 19 May 2026 13:10:03 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy

      Chromium LUCI CQ (Gerrit)

      unread,
      May 19, 2026, 9:15:53β€―AMΒ (18 hours ago)Β May 19
      to Patrick Meenan, Yoav Weiss (@Shopify), AI Code Reviewer, chromium...@chromium.org, Nate Chapin, blink-...@chromium.org, gavinp...@chromium.org, loading...@chromium.org

      Chromium LUCI CQ submitted the change with unreviewed changes

      Unreviewed changes

      1 is the latest approved patch-set.
      The change was submitted with unreviewed changes in the following files:

      ```
      The name of the file: third_party/blink/renderer/core/loader/frame_fetch_context.cc
      Insertions: 2, Deletions: 2.

      The diff is too large to show. Please review the diff.
      ```
      ```
      The name of the file: third_party/blink/renderer/core/loader/frame_fetch_context.h
      Insertions: 1, Deletions: 1.

      The diff is too large to show. Please review the diff.
      ```

      Change information

      Commit message:
      Reduce overhead of adding client hints

      This is work targeted at reducing the renderer main thread overhead of
      resource loading. Specifically when loading resources from memory cache
      in the context of something like Speedometer 3's NewsSite stories.

      ~25% of the time spent in resource loading in the benchmark is from
      AddClientHintsIfNecessary but it's largely a tooling issue because
      chromedriver is used to automate the testing through devtools and
      devtools triggers the resource loader to manually add headers to the
      request that it doesn't otherwise use.

      The main improvement here is in more accurate performance testing when
      webdriver/chromedriver/devtools are being used and resources come
      from the memory cache. We no longer explicitly set the
      "UpgradeForLoader" bit just because devtools is attached (it will
      still do it for all requests that miss the memory cache). That alone
      eliminated ~30% of the resource request time on the main renderer
      thread.

      The CL also includes a couple of improvements to the underlying
      client hints processing for when it does run:

      - The is_1p_origin flag was not used by ShouldSendClientHint() so
      it was removed and no longer needed to be calculated.

      - The UA platform string is now cached on only changed when the UA
      changes (similar to the other static headers).

      - The client hint preferences are returned by reference instead of
      by value.
      Bug: 512514655
      Change-Id: I64423ed4dba0f2ef1148213fa8080137ffa71b96
      Reviewed-by: Yoav Weiss (@Shopify) <yoav...@chromium.org>
      Commit-Queue: Patrick Meenan <pme...@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#1632808}
      Files:
      • M third_party/blink/renderer/core/loader/frame_fetch_context.cc
      • M third_party/blink/renderer/core/loader/frame_fetch_context.h
      Change size: M
      Delta: 2 files changed, 59 insertions(+), 38 deletions(-)
      Branch: refs/heads/main
      Submit Requirements:
      • requirement satisfiedCode-Review: +1 by Yoav Weiss (@Shopify)
      Open in Gerrit
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: merged
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I64423ed4dba0f2ef1148213fa8080137ffa71b96
      Gerrit-Change-Number: 7851236
      Gerrit-PatchSet: 4
      Gerrit-Owner: Patrick Meenan <pme...@chromium.org>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-Reviewer: Patrick Meenan <pme...@chromium.org>
      Gerrit-Reviewer: Yoav Weiss (@Shopify) <yoav...@chromium.org>
      Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
      open
      diffy
      satisfied_requirement
      Reply all
      Reply to author
      Forward
      0 new messages