Add if origin is recently accessed in cache rejection status metrics [chromium/src : main]

0 views
Skip to first unread message

Mingyu Lei (Gerrit)

unread,
Sep 8, 2025, 6:46:10 AM (11 days ago) Sep 8
to Rakina Zata Amni, AyeAye, Tsuyoshi Horo, Nidhi Jaju, Hidehiko Abe, Adam Rice, Chromium IPC Reviews, Adam Rice, SandeepKumar PRAYAGRAJ, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, navigation...@chromium.org, ipc-securi...@chromium.org, network-ser...@chromium.org, asvitkine...@chromium.org, bnc+...@chromium.org, gavin...@chromium.org, loading...@chromium.org, net-r...@chromium.org
Attention needed from Adam Rice, Adam Rice, Hidehiko Abe, Nasko Oskov, Nidhi Jaju, Rakina Zata Amni and Tsuyoshi Horo

Mingyu Lei added 1 comment

File content/browser/loader/navigation_url_loader_impl.cc
Line 301, Patchset 19: }
Nasko Oskov . unresolved

This is concerning to me. Navigation is already performance sensitive and this adds a traversal of *all* session history entries for the current profile on every navigation that hits the network. Can we at least instrument with measurements how long does this take?
For example, I have currently 800+ tabs in my work profile to manage my state. Each tab has non-trivial session history. It is likely this change will add some milliseconds to each navigation I perform.

Mingyu Lei

Thanks, yeah we are aware of the potential performance impact and that's why the feature flag was added. When it's turned off, IsMainFrameOriginAccessibleByHistoryNavigation will just return false (see the help method in content/browser/url_loader_factory_params_helper.cc.

The purpose of setting this flag is for metrics collecting, and we will only enable it to a very small amount of users (1% should be enough) in stable. After we have the metrics we want, the logic will be cleaned up.

Nasko Oskov

I do not believe we should be experimenting on 1% stable with this code. Happy to discuss alternatives in higher bandwidth modes, but we should not be landing this CL.

Mingyu Lei

I tried the local build with around 100 tabs, each with some entries, and the time taken for the tab traversal is around 0.1~0.2ms, yes I expect it to grow to more than 1ms when the number of tabs grow larger.

Also I found that this metric may not be as useful as we hope it to be, for example, when restoring a tab, it might be navigating to a resource whose main frame origin is not accessible (since it's closed before the restore). After some discussion with @rak...@chromium.org, I reimplement this and now we are differentiating the navigation by whether "it's loading a resource whose main frame origin is recently accessed". This actually sounds like another layer of LRU cache but it's for origin only.

Open in Gerrit

Related details

Attention is currently required from:
  • Adam Rice
  • Adam Rice
  • Hidehiko Abe
  • Nasko Oskov
  • Nidhi Jaju
  • Rakina Zata Amni
  • Tsuyoshi Horo
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
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: Ia0e46e6a86449100008bf2c22356e8c262d8ebf0
Gerrit-Change-Number: 6857439
Gerrit-PatchSet: 24
Gerrit-Owner: Mingyu Lei <le...@chromium.org>
Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
Gerrit-Reviewer: Mingyu Lei <le...@chromium.org>
Gerrit-Reviewer: Nasko Oskov <na...@chromium.org>
Gerrit-Reviewer: Nidhi Jaju <nidh...@chromium.org>
Gerrit-Reviewer: Rakina Zata Amni <rak...@chromium.org>
Gerrit-Reviewer: Tsuyoshi Horo <ho...@chromium.org>
Gerrit-CC: Adam Rice <ri...@google.com>
Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-CC: SandeepKumar PRAYAGRAJ <sandipk...@gmail.com>
Gerrit-CC: gwsq
Gerrit-Attention: Hidehiko Abe <hide...@chromium.org>
Gerrit-Attention: Rakina Zata Amni <rak...@chromium.org>
Gerrit-Attention: Nidhi Jaju <nidh...@chromium.org>
Gerrit-Attention: Adam Rice <ri...@chromium.org>
Gerrit-Attention: Tsuyoshi Horo <ho...@chromium.org>
Gerrit-Attention: Adam Rice <ri...@google.com>
Gerrit-Attention: Nasko Oskov <na...@chromium.org>
Gerrit-Comment-Date: Mon, 08 Sep 2025 10:45:43 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Mingyu Lei <le...@chromium.org>
Comment-In-Reply-To: Nasko Oskov <na...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Nasko Oskov (Gerrit)

unread,
Sep 8, 2025, 5:05:45 PM (11 days ago) Sep 8
to Mingyu Lei, Rakina Zata Amni, AyeAye, Tsuyoshi Horo, Nidhi Jaju, Hidehiko Abe, Adam Rice, Chromium IPC Reviews, Adam Rice, SandeepKumar PRAYAGRAJ, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, navigation...@chromium.org, ipc-securi...@chromium.org, network-ser...@chromium.org, asvitkine...@chromium.org, bnc+...@chromium.org, gavin...@chromium.org, loading...@chromium.org, net-r...@chromium.org
Attention needed from Adam Rice, Adam Rice, Hidehiko Abe, Mingyu Lei, Nidhi Jaju, Rakina Zata Amni and Tsuyoshi Horo

Nasko Oskov added 2 comments

File content/browser/loader/navigation_url_loader_impl.cc
Line 301, Patchset 19: }
Nasko Oskov . resolved

This is concerning to me. Navigation is already performance sensitive and this adds a traversal of *all* session history entries for the current profile on every navigation that hits the network. Can we at least instrument with measurements how long does this take?
For example, I have currently 800+ tabs in my work profile to manage my state. Each tab has non-trivial session history. It is likely this change will add some milliseconds to each navigation I perform.

Mingyu Lei

Thanks, yeah we are aware of the potential performance impact and that's why the feature flag was added. When it's turned off, IsMainFrameOriginAccessibleByHistoryNavigation will just return false (see the help method in content/browser/url_loader_factory_params_helper.cc.

The purpose of setting this flag is for metrics collecting, and we will only enable it to a very small amount of users (1% should be enough) in stable. After we have the metrics we want, the logic will be cleaned up.

Nasko Oskov

I do not believe we should be experimenting on 1% stable with this code. Happy to discuss alternatives in higher bandwidth modes, but we should not be landing this CL.

Mingyu Lei

I tried the local build with around 100 tabs, each with some entries, and the time taken for the tab traversal is around 0.1~0.2ms, yes I expect it to grow to more than 1ms when the number of tabs grow larger.

Also I found that this metric may not be as useful as we hope it to be, for example, when restoring a tab, it might be navigating to a resource whose main frame origin is not accessible (since it's closed before the restore). After some discussion with @rak...@chromium.org, I reimplement this and now we are differentiating the navigation by whether "it's loading a resource whose main frame origin is recently accessed". This actually sounds like another layer of LRU cache but it's for origin only.

Nasko Oskov

Thank you for re-evaluating and coming up with a different solution. It looks like a better to have a LRU cache to store those. I have a comment on that solution, but I think this thread is at this point complete and I will resolve it.

File content/browser/url_loader_factory_params_helper.cc
Line 383, Patchset 24 (Latest): GetRecentlyAccessedOriginSet().Put(std::move(origin));
Nasko Oskov . unresolved

If we continuously put origins in the set without pruning it periodically, wouldn't it grow unbounded over time? There is no recency defined for this set.

Open in Gerrit

Related details

Attention is currently required from:
  • Adam Rice
  • Adam Rice
  • Hidehiko Abe
  • Mingyu Lei
Gerrit-Attention: Mingyu Lei <le...@chromium.org>
Gerrit-Attention: Adam Rice <ri...@chromium.org>
Gerrit-Attention: Tsuyoshi Horo <ho...@chromium.org>
Gerrit-Attention: Adam Rice <ri...@google.com>
Gerrit-Comment-Date: Mon, 08 Sep 2025 21:05:35 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Mingyu Lei (Gerrit)

unread,
Sep 8, 2025, 10:37:24 PM (10 days ago) Sep 8
to Rakina Zata Amni, AyeAye, Tsuyoshi Horo, Nidhi Jaju, Hidehiko Abe, Adam Rice, Chromium IPC Reviews, Adam Rice, SandeepKumar PRAYAGRAJ, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, navigation...@chromium.org, ipc-securi...@chromium.org, network-ser...@chromium.org, asvitkine...@chromium.org, bnc+...@chromium.org, gavin...@chromium.org, loading...@chromium.org, net-r...@chromium.org
Attention needed from Adam Rice, Adam Rice, Hidehiko Abe, Nasko Oskov, Nidhi Jaju, Rakina Zata Amni and Tsuyoshi Horo

Mingyu Lei voted and added 1 comment

Votes added by Mingyu Lei

Commit-Queue+1

1 comment

File content/browser/url_loader_factory_params_helper.cc
Line 383, Patchset 24 (Latest): GetRecentlyAccessedOriginSet().Put(std::move(origin));
Nasko Oskov . unresolved

If we continuously put origins in the set without pruning it periodically, wouldn't it grow unbounded over time? There is no recency defined for this set.

Mingyu Lei

The size is a concern, so the set returned by `GetRecentlyAccessedOriginSet()` *is* an LRUCacheSet and I put the limit in feature flag param (`kRecentlyAccessedOriginCacheSize`, default to 64). The eviction behavior is also covered in the unit test.

Open in Gerrit

Related details

Attention is currently required from:
  • Adam Rice
  • Adam Rice
  • Hidehiko Abe
  • Nasko Oskov
Gerrit-Attention: Adam Rice <ri...@chromium.org>
Gerrit-Attention: Tsuyoshi Horo <ho...@chromium.org>
Gerrit-Attention: Adam Rice <ri...@google.com>
Gerrit-Attention: Nasko Oskov <na...@chromium.org>
Gerrit-Comment-Date: Tue, 09 Sep 2025 02:36:50 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Nasko Oskov <na...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Adam Rice (Gerrit)

unread,
Sep 9, 2025, 3:08:28 AM (10 days ago) Sep 9
to Mingyu Lei, Rakina Zata Amni, AyeAye, Tsuyoshi Horo, Nidhi Jaju, Hidehiko Abe, Chromium IPC Reviews, SandeepKumar PRAYAGRAJ, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, navigation...@chromium.org, ipc-securi...@chromium.org, network-ser...@chromium.org, asvitkine...@chromium.org, bnc+...@chromium.org, gavin...@chromium.org, loading...@chromium.org, net-r...@chromium.org
Attention needed from Hidehiko Abe, Mingyu Lei, Nasko Oskov, Nidhi Jaju, Rakina Zata Amni and Tsuyoshi Horo

Adam Rice added 2 comments

Patchset-level comments
File-level comment, Patchset 24 (Latest):
Adam Rice . resolved

//net and //services/network lgtm

File net/base/features.h
Line 942, Patchset 24 (Latest):// `IS_MAIN_FRAME_ORIGIN_RECENTLY_ACCESSED` load flag.
Adam Rice . unresolved

It would be good for the comment to mention that this only affects metrics.

Open in Gerrit

Related details

Attention is currently required from:
  • Hidehiko Abe
  • Mingyu Lei
Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-CC: SandeepKumar PRAYAGRAJ <sandipk...@gmail.com>
Gerrit-CC: gwsq
Gerrit-Attention: Hidehiko Abe <hide...@chromium.org>
Gerrit-Attention: Rakina Zata Amni <rak...@chromium.org>
Gerrit-Attention: Nidhi Jaju <nidh...@chromium.org>
Gerrit-Attention: Mingyu Lei <le...@chromium.org>
Gerrit-Attention: Tsuyoshi Horo <ho...@chromium.org>
Gerrit-Attention: Nasko Oskov <na...@chromium.org>
Gerrit-Comment-Date: Tue, 09 Sep 2025 07:07:59 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Adam Rice (Gerrit)

unread,
Sep 9, 2025, 3:08:28 AM (10 days ago) Sep 9
to Mingyu Lei, Rakina Zata Amni, AyeAye, Tsuyoshi Horo, Nidhi Jaju, Hidehiko Abe, Chromium IPC Reviews, SandeepKumar PRAYAGRAJ, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, navigation...@chromium.org, ipc-securi...@chromium.org, network-ser...@chromium.org, asvitkine...@chromium.org, bnc+...@chromium.org, gavin...@chromium.org, loading...@chromium.org, net-r...@chromium.org
Attention needed from Hidehiko Abe, Mingyu Lei, Nasko Oskov, Nidhi Jaju, Rakina Zata Amni and Tsuyoshi Horo

Adam Rice voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Hidehiko Abe
  • Mingyu Lei
  • Nasko Oskov
  • Nidhi Jaju
  • Rakina Zata Amni
  • Tsuyoshi Horo
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement satisfiedCode-Review
    Gerrit-Comment-Date: Tue, 09 Sep 2025 07:08:05 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Nasko Oskov (Gerrit)

    unread,
    Sep 9, 2025, 7:53:09 PM (9 days ago) Sep 9
    to Mingyu Lei, Adam Rice, Rakina Zata Amni, AyeAye, Tsuyoshi Horo, Nidhi Jaju, Hidehiko Abe, Chromium IPC Reviews, SandeepKumar PRAYAGRAJ, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, navigation...@chromium.org, ipc-securi...@chromium.org, network-ser...@chromium.org, asvitkine...@chromium.org, bnc+...@chromium.org, gavin...@chromium.org, loading...@chromium.org, net-r...@chromium.org
    Attention needed from Hidehiko Abe, Mingyu Lei, Nidhi Jaju, Rakina Zata Amni and Tsuyoshi Horo

    Nasko Oskov voted and added 2 comments

    Votes added by Nasko Oskov

    Code-Review+1

    2 comments

    Patchset-level comments
    Nasko Oskov . resolved

    LGTM

    File content/browser/url_loader_factory_params_helper.cc
    Line 383, Patchset 24 (Latest): GetRecentlyAccessedOriginSet().Put(std::move(origin));
    Nasko Oskov . resolved

    If we continuously put origins in the set without pruning it periodically, wouldn't it grow unbounded over time? There is no recency defined for this set.

    Mingyu Lei

    The size is a concern, so the set returned by `GetRecentlyAccessedOriginSet()` *is* an LRUCacheSet and I put the limit in feature flag param (`kRecentlyAccessedOriginCacheSize`, default to 64). The eviction behavior is also covered in the unit test.

    Nasko Oskov

    Acknowledged

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Hidehiko Abe
    • Mingyu Lei
    • Nidhi Jaju
    • Rakina Zata Amni
    • Tsuyoshi Horo
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      Gerrit-Comment-Date: Tue, 09 Sep 2025 23:53:00 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Tsuyoshi Horo (Gerrit)

      unread,
      Sep 10, 2025, 1:00:22 AM (9 days ago) Sep 10
      to Mingyu Lei, Adam Rice, Rakina Zata Amni, AyeAye, Nidhi Jaju, Hidehiko Abe, Chromium IPC Reviews, SandeepKumar PRAYAGRAJ, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, navigation...@chromium.org, ipc-securi...@chromium.org, network-ser...@chromium.org, asvitkine...@chromium.org, bnc+...@chromium.org, gavin...@chromium.org, loading...@chromium.org, net-r...@chromium.org
      Attention needed from Hidehiko Abe, Mingyu Lei, Nidhi Jaju and Rakina Zata Amni

      Tsuyoshi Horo voted and added 1 comment

      Votes added by Tsuyoshi Horo

      Code-Review+1

      1 comment

      Patchset-level comments

      Related details

      Attention is currently required from:
      • Hidehiko Abe
      • Mingyu Lei
      • Nidhi Jaju
      • Rakina Zata Amni
      Gerrit-Comment-Date: Wed, 10 Sep 2025 04:59:52 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Rakina Zata Amni (Gerrit)

      unread,
      Sep 10, 2025, 1:26:24 AM (9 days ago) Sep 10
      to Mingyu Lei, Tsuyoshi Horo, Adam Rice, AyeAye, Nidhi Jaju, Hidehiko Abe, Chromium IPC Reviews, SandeepKumar PRAYAGRAJ, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, navigation...@chromium.org, ipc-securi...@chromium.org, network-ser...@chromium.org, asvitkine...@chromium.org, bnc+...@chromium.org, gavin...@chromium.org, loading...@chromium.org, net-r...@chromium.org
      Attention needed from Hidehiko Abe, Mingyu Lei and Nidhi Jaju

      Rakina Zata Amni voted Code-Review+1

      Code-Review+1
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Hidehiko Abe
      • Mingyu Lei
      • Nidhi Jaju
      Gerrit-Attention: Nidhi Jaju <nidh...@chromium.org>
      Gerrit-Attention: Mingyu Lei <le...@chromium.org>
      Gerrit-Comment-Date: Wed, 10 Sep 2025 05:25:56 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Nidhi Jaju (Gerrit)

      unread,
      Sep 11, 2025, 12:44:13 AM (8 days ago) Sep 11
      to Mingyu Lei, Rakina Zata Amni, Tsuyoshi Horo, Adam Rice, AyeAye, Hidehiko Abe, Chromium IPC Reviews, SandeepKumar PRAYAGRAJ, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, navigation...@chromium.org, ipc-securi...@chromium.org, network-ser...@chromium.org, asvitkine...@chromium.org, bnc+...@chromium.org, gavin...@chromium.org, loading...@chromium.org, net-r...@chromium.org
      Attention needed from Hidehiko Abe and Mingyu Lei

      Nidhi Jaju added 1 comment

      File tools/metrics/histograms/metadata/net/histograms.xml
      Line 631, Patchset 24 (Latest): Records the outcome of considering whether to reject a cache entry based on
      in-memory hints. This is used to avoid accessing disk for entries that are
      likely to be unusable. Recorded every time we try to open a cache entry, but
      there is no active one.
      Nidhi Jaju . unresolved

      This is the same as the description in "HttpCache.EntryRejectionStatus". Can we just make this a variant on the previous histogram, and update the summary in the variants accordingly to mention when it's recorded?

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Hidehiko Abe
      • Mingyu Lei
      Gerrit-Attention: Mingyu Lei <le...@chromium.org>
      Gerrit-Comment-Date: Thu, 11 Sep 2025 04:43:42 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Mingyu Lei (Gerrit)

      unread,
      Sep 11, 2025, 2:03:28 AM (8 days ago) Sep 11
      to Rakina Zata Amni, Tsuyoshi Horo, Adam Rice, AyeAye, Nidhi Jaju, Hidehiko Abe, Chromium IPC Reviews, SandeepKumar PRAYAGRAJ, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, navigation...@chromium.org, ipc-securi...@chromium.org, network-ser...@chromium.org, asvitkine...@chromium.org, bnc+...@chromium.org, gavin...@chromium.org, loading...@chromium.org, net-r...@chromium.org
      Attention needed from Hidehiko Abe and Nidhi Jaju

      Mingyu Lei voted and added 3 comments

      Votes added by Mingyu Lei

      Commit-Queue+1

      3 comments

      Commit Message
      Line 31, Patchset 19:for more background and discussion (googlers only)
      Nasko Oskov . resolved

      I do not have access to this document, even as a googler, so I cannot sign off on this CL without understanding why this change is necessary.

      Nasko Oskov

      Thanks for sharing the document. I am not convinced that walking all session history on each navigation synchronously is right approach here. Can this be accomplished in a different way that is not on the blocking path?

      Mingyu Lei

      Done

      File net/base/features.h
      Line 942, Patchset 24:// `IS_MAIN_FRAME_ORIGIN_RECENTLY_ACCESSED` load flag.
      Adam Rice . resolved

      It would be good for the comment to mention that this only affects metrics.

      Mingyu Lei

      Done

      File tools/metrics/histograms/metadata/net/histograms.xml
      Line 631, Patchset 24: Records the outcome of considering whether to reject a cache entry based on

      in-memory hints. This is used to avoid accessing disk for entries that are
      likely to be unusable. Recorded every time we try to open a cache entry, but
      there is no active one.
      Nidhi Jaju . resolved

      This is the same as the description in "HttpCache.EntryRejectionStatus". Can we just make this a variant on the previous histogram, and update the summary in the variants accordingly to mention when it's recorded?

      Mingyu Lei

      Done, PTAL. Thanks.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Hidehiko Abe
      • Nidhi Jaju
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      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: Ia0e46e6a86449100008bf2c22356e8c262d8ebf0
      Gerrit-Change-Number: 6857439
      Gerrit-PatchSet: 25
      Gerrit-Owner: Mingyu Lei <le...@chromium.org>
      Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
      Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
      Gerrit-Reviewer: Mingyu Lei <le...@chromium.org>
      Gerrit-Reviewer: Nasko Oskov <na...@chromium.org>
      Gerrit-Reviewer: Nidhi Jaju <nidh...@chromium.org>
      Gerrit-Reviewer: Rakina Zata Amni <rak...@chromium.org>
      Gerrit-Reviewer: Tsuyoshi Horo <ho...@chromium.org>
      Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
      Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
      Gerrit-CC: SandeepKumar PRAYAGRAJ <sandipk...@gmail.com>
      Gerrit-CC: gwsq
      Gerrit-Attention: Hidehiko Abe <hide...@chromium.org>
      Gerrit-Attention: Nidhi Jaju <nidh...@chromium.org>
      Gerrit-Comment-Date: Thu, 11 Sep 2025 06:02:53 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Nidhi Jaju <nidh...@chromium.org>
      Comment-In-Reply-To: Adam Rice <ri...@chromium.org>
      Comment-In-Reply-To: Nasko Oskov <na...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Mingyu Lei (Gerrit)

      unread,
      Sep 11, 2025, 8:00:45 AM (8 days ago) Sep 11
      to Rakina Zata Amni, Tsuyoshi Horo, Adam Rice, AyeAye, Nidhi Jaju, Hidehiko Abe, Chromium IPC Reviews, SandeepKumar PRAYAGRAJ, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, navigation...@chromium.org, ipc-securi...@chromium.org, network-ser...@chromium.org, asvitkine...@chromium.org, bnc+...@chromium.org, gavin...@chromium.org, loading...@chromium.org, net-r...@chromium.org
      Attention needed from Hidehiko Abe and Nidhi Jaju

      Mingyu Lei added 1 comment

      Patchset-level comments
      File-level comment, Patchset 24:
      Tsuyoshi Horo . resolved
      Mingyu Lei

      Done

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Hidehiko Abe
      • Nidhi Jaju
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      Gerrit-Comment-Date: Thu, 11 Sep 2025 12:00:07 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Tsuyoshi Horo <ho...@chromium.org>
      satisfied_requirement
      open
      diffy

      Nidhi Jaju (Gerrit)

      unread,
      Sep 11, 2025, 10:55:57 PM (7 days ago) Sep 11
      to Mingyu Lei, Rakina Zata Amni, Tsuyoshi Horo, Adam Rice, AyeAye, Hidehiko Abe, Chromium IPC Reviews, SandeepKumar PRAYAGRAJ, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, navigation...@chromium.org, ipc-securi...@chromium.org, network-ser...@chromium.org, asvitkine...@chromium.org, bnc+...@chromium.org, gavin...@chromium.org, loading...@chromium.org, net-r...@chromium.org
      Attention needed from Hidehiko Abe and Mingyu Lei

      Nidhi Jaju voted and added 2 comments

      Votes added by Nidhi Jaju

      Code-Review+1

      2 comments

      Patchset-level comments
      File-level comment, Patchset 25 (Latest):
      Nidhi Jaju . resolved

      histograms lgtm, with nit

      File tools/metrics/histograms/metadata/net/histograms.xml
      Line 607, Patchset 25 (Latest): This metric logs the outcome of considering whether to reject a cache entry
      based on in-memory hints, which is used to avoid accessing disk for entries

      that are likely to be unusable.

      The general metric (with empty variant name) is recorded every time when we
      try to open a cache entry but no active entry is found. A variant is
      recorded specifically when the `UpdateIsMainFrameOriginRecentlyAccessed`
      flag is set, indicating the request contains recent-access information for
      the resource's main frame origin.
      </summary>
      <token key="Type">
      <variant name="" summary="recorded for every request"/>
      <variant name=".MainFrameOriginNotRecentlyAccessed"
      summary="requests to resources whose main frame's origin is not
      recently accessed"/>
      <variant name=".MainFrameOriginRecentlyAccessed"
      summary="requests to resources whose main frame's origin is recently
      accessed"/>
      Nidhi Jaju . unresolved

      Sorry if it was unclear, we can actually use the variants' summary in the histogram description, otherwise we won't see the differences on the dashboard.

      ```suggestion

      Records the outcome of considering whether to reject a cache entry based on
      in-memory hints. This is used to avoid accessing disk for entries that are
      likely to be unusable. Recorded every time we try to open a cache entry, but
          there is no active one{Type}
      </summary>
      <token key="Type">
      <variant name="" summary="."/>
      <variant name=".MainFrameOriginNotRecentlyAccessed"
      summary=", only if `UpdateIsMainFrameOriginRecentlyAccessed` is
      enabled and the request is for a resource whose main frame's origin is not
      recently accessed."/>
      <variant name=".MainFrameOriginRecentlyAccessed"
      summary=", only if `UpdateIsMainFrameOriginRecentlyAccessed` is
      enabled and the request is for a resource whose main frame's origin is recently
      accessed."/>
      ```
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Hidehiko Abe
      • Mingyu Lei
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        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: Ia0e46e6a86449100008bf2c22356e8c262d8ebf0
        Gerrit-Change-Number: 6857439
        Gerrit-PatchSet: 25
        Gerrit-Owner: Mingyu Lei <le...@chromium.org>
        Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
        Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
        Gerrit-Reviewer: Mingyu Lei <le...@chromium.org>
        Gerrit-Reviewer: Nasko Oskov <na...@chromium.org>
        Gerrit-Reviewer: Nidhi Jaju <nidh...@chromium.org>
        Gerrit-Reviewer: Rakina Zata Amni <rak...@chromium.org>
        Gerrit-Reviewer: Tsuyoshi Horo <ho...@chromium.org>
        Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
        Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
        Gerrit-CC: SandeepKumar PRAYAGRAJ <sandipk...@gmail.com>
        Gerrit-CC: gwsq
        Gerrit-Attention: Hidehiko Abe <hide...@chromium.org>
        Gerrit-Attention: Mingyu Lei <le...@chromium.org>
        Gerrit-Comment-Date: Fri, 12 Sep 2025 02:55:33 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Mingyu Lei (Gerrit)

        unread,
        Sep 12, 2025, 2:45:53 AM (7 days ago) Sep 12
        to Nidhi Jaju, Rakina Zata Amni, Tsuyoshi Horo, Adam Rice, AyeAye, Hidehiko Abe, Chromium IPC Reviews, SandeepKumar PRAYAGRAJ, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, navigation...@chromium.org, ipc-securi...@chromium.org, network-ser...@chromium.org, asvitkine...@chromium.org, bnc+...@chromium.org, gavin...@chromium.org, loading...@chromium.org, net-r...@chromium.org
        Attention needed from Hidehiko Abe

        Mingyu Lei voted and added 1 comment

        Votes added by Mingyu Lei

        Commit-Queue+1

        1 comment

        File tools/metrics/histograms/metadata/net/histograms.xml
        Line 607, Patchset 25: This metric logs the outcome of considering whether to reject a cache entry

        based on in-memory hints, which is used to avoid accessing disk for entries
        that are likely to be unusable.

        The general metric (with empty variant name) is recorded every time when we
        try to open a cache entry but no active entry is found. A variant is
        recorded specifically when the `UpdateIsMainFrameOriginRecentlyAccessed`
        flag is set, indicating the request contains recent-access information for
        the resource's main frame origin.
        </summary>
        <token key="Type">
        <variant name="" summary="recorded for every request"/>
        <variant name=".MainFrameOriginNotRecentlyAccessed"
        summary="requests to resources whose main frame's origin is not
        recently accessed"/>
        <variant name=".MainFrameOriginRecentlyAccessed"
        summary="requests to resources whose main frame's origin is recently
        accessed"/>
        Nidhi Jaju . resolved

        Sorry if it was unclear, we can actually use the variants' summary in the histogram description, otherwise we won't see the differences on the dashboard.

        ```suggestion
        Records the outcome of considering whether to reject a cache entry based on
        in-memory hints. This is used to avoid accessing disk for entries that are
        likely to be unusable. Recorded every time we try to open a cache entry, but
        there is no active one{Type}
        </summary>
        <token key="Type">
        <variant name="" summary="."/>
        <variant name=".MainFrameOriginNotRecentlyAccessed"
        summary=", only if `UpdateIsMainFrameOriginRecentlyAccessed` is
        enabled and the request is for a resource whose main frame's origin is not
        recently accessed."/>
        <variant name=".MainFrameOriginRecentlyAccessed"
        summary=", only if `UpdateIsMainFrameOriginRecentlyAccessed` is
        enabled and the request is for a resource whose main frame's origin is recently
        accessed."/>
        ```
        Mingyu Lei

        Oh I thought we can only replace with the variant name in the template. Updated.

        Thanks!

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Hidehiko Abe
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        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: Ia0e46e6a86449100008bf2c22356e8c262d8ebf0
        Gerrit-Change-Number: 6857439
        Gerrit-PatchSet: 26
        Gerrit-Owner: Mingyu Lei <le...@chromium.org>
        Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
        Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
        Gerrit-Reviewer: Mingyu Lei <le...@chromium.org>
        Gerrit-Reviewer: Nasko Oskov <na...@chromium.org>
        Gerrit-Reviewer: Nidhi Jaju <nidh...@chromium.org>
        Gerrit-Reviewer: Rakina Zata Amni <rak...@chromium.org>
        Gerrit-Reviewer: Tsuyoshi Horo <ho...@chromium.org>
        Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
        Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
        Gerrit-CC: SandeepKumar PRAYAGRAJ <sandipk...@gmail.com>
        Gerrit-CC: gwsq
        Gerrit-Attention: Hidehiko Abe <hide...@chromium.org>
        Gerrit-Comment-Date: Fri, 12 Sep 2025 06:45:12 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        Comment-In-Reply-To: Nidhi Jaju <nidh...@chromium.org>
        satisfied_requirement
        open
        diffy

        Mingyu Lei (Gerrit)

        unread,
        Sep 15, 2025, 9:48:43 PM (3 days ago) Sep 15
        to Nidhi Jaju, Rakina Zata Amni, Tsuyoshi Horo, Adam Rice, AyeAye, Hidehiko Abe, Chromium IPC Reviews, SandeepKumar PRAYAGRAJ, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, navigation...@chromium.org, ipc-securi...@chromium.org, network-ser...@chromium.org, asvitkine...@chromium.org, bnc+...@chromium.org, gavin...@chromium.org, loading...@chromium.org, net-r...@chromium.org
        Attention needed from Hidehiko Abe

        Mingyu Lei voted Commit-Queue+2

        Commit-Queue+2
        Gerrit-Comment-Date: Tue, 16 Sep 2025 01:48:04 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        open
        diffy

        Chromium LUCI CQ (Gerrit)

        unread,
        Sep 15, 2025, 11:29:57 PM (3 days ago) Sep 15
        to Mingyu Lei, Nidhi Jaju, Rakina Zata Amni, Tsuyoshi Horo, Adam Rice, AyeAye, Hidehiko Abe, Chromium IPC Reviews, SandeepKumar PRAYAGRAJ, Chromium Metrics Reviews, chromium...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, navigation...@chromium.org, ipc-securi...@chromium.org, network-ser...@chromium.org, asvitkine...@chromium.org, bnc+...@chromium.org, gavin...@chromium.org, loading...@chromium.org, net-r...@chromium.org

        Chromium LUCI CQ submitted the change with unreviewed changes

        Unreviewed changes

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

        ```
        The name of the file: tools/metrics/histograms/metadata/net/histograms.xml
        Insertions: 11, Deletions: 14.

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

        Change information

        Commit message:
        Add if origin is recently accessed in cache rejection status metrics

        This CL marks navigation requests for resources whose main frame origin
        has been seen before. Instead of checking the entire navigation history,
        this CL introduces a new mechanism to track recently accessed main frame
        origins.

        A new feature flag, kUpdateIsMainFrameOriginRecentlyAccessed, is
        introduced to control this functionality, and it is disabled by default.
        When enabled, a new load flag, IS_MAIN_FRAME_ORIGIN_RECENTLY_ACCESSED,
        and a new URLLoaderFactoryParams, is_main_frame_origin_recently_accessed
        are used to plumb the information from //content/browser and
        //services/network to //net/http.

        When the feature is enabled, URLLoaderFactoryParamsHelper will maintain
        an LRU cache of recently accessed main frame origins. On each main frame
        navigation, the origin will be added to the cache. For each navigation
        request, the browser will check if the main frame origin is in the cache
        and set the new load flag accordingly.

        The UMA metric HttpCache.EntryRejectionStatus is updated to be recorded
        with suffixes MainFrameOriginRecentlyAccessed and
        MainFrameOriginNotRecentlyAccessed to analyze the behavior differences
        between requests based on whether their main frame origin has been
        recently accessed.

        See
        https://docs.google.com/document/d/1rfWTtUjo5gfA8jFFw1SQzANK5hXxQf6QC4cFiGDyjns

        for more background and discussion (googlers only)
        Bug: 428800266
        Change-Id: Ia0e46e6a86449100008bf2c22356e8c262d8ebf0
        Reviewed-by: Tsuyoshi Horo <ho...@chromium.org>
        Commit-Queue: Mingyu Lei <le...@chromium.org>
        Reviewed-by: Nidhi Jaju <nidh...@chromium.org>
        Reviewed-by: Adam Rice <ri...@chromium.org>
        Reviewed-by: Nasko Oskov <na...@chromium.org>
        Reviewed-by: Rakina Zata Amni <rak...@chromium.org>
        Cr-Commit-Position: refs/heads/main@{#1515830}
        Files:
        • M chrome/browser/chrome_content_browser_client.cc
        • M chrome/browser/chrome_content_browser_client.h
        • M chrome/browser/chrome_content_browser_client_unittest.cc
        • M content/browser/loader/navigation_url_loader_impl.cc
        • M content/browser/renderer_host/navigation_request.cc
        • M content/browser/url_loader_factory_params_helper.cc
        • M content/browser/url_loader_factory_params_helper.h
        • A content/browser/url_loader_factory_params_helper_unittest.cc
        • M content/public/browser/content_browser_client.cc
        • M content/public/browser/content_browser_client.h
        • M content/test/BUILD.gn
        • M net/base/features.cc
        • M net/base/features.h
        • M net/base/load_flags_list.h
        • M net/http/http_cache_transaction.cc
        • M services/network/cors/cors_url_loader_factory.cc
        • M services/network/cors/cors_url_loader_factory.h
        • M services/network/public/mojom/network_context.mojom
        • M tools/metrics/histograms/metadata/net/histograms.xml
        Change size: L
        Delta: 19 files changed, 238 insertions(+), 105 deletions(-)
        Branch: refs/heads/main
        Submit Requirements:
        • requirement satisfiedCode-Review: +1 by Tsuyoshi Horo, +1 by Nidhi Jaju, +1 by Rakina Zata Amni, +1 by Nasko Oskov, +1 by Adam Rice
        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: Ia0e46e6a86449100008bf2c22356e8c262d8ebf0
        Gerrit-Change-Number: 6857439
        Gerrit-PatchSet: 27
        Gerrit-Owner: Mingyu Lei <le...@chromium.org>
        Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
        Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
        Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
        Gerrit-Reviewer: Mingyu Lei <le...@chromium.org>
        Gerrit-Reviewer: Nasko Oskov <na...@chromium.org>
        Gerrit-Reviewer: Nidhi Jaju <nidh...@chromium.org>
        Gerrit-Reviewer: Rakina Zata Amni <rak...@chromium.org>
        Gerrit-Reviewer: Tsuyoshi Horo <ho...@chromium.org>
        Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
        open
        diffy
        satisfied_requirement
        Reply all
        Reply to author
        Forward
        0 new messages