[SVG] Introduce a registry for managing `AgentGroupScheduler` and `SVGDocumentResourceTracker` [chromium/src : main]

0 views
Skip to first unread message

Divyansh Mangal (Gerrit)

unread,
Feb 3, 2026, 3:30:52 AM (5 days ago) Feb 3
to Vinay Singh, Virali Purbey, Sejal Anand, Dileep Maurya, Gaurav Kumar, Ragvesh Sharma, chrom...@appspot.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Dirk Schulze, Fredrik Söderquist, Stephen Chenney, blink-isola...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, fmalit...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, kouhe...@chromium.org, pdr+svgw...@chromium.org, scheduler-...@chromium.org
Attention needed from Vinay Singh and Virali Purbey

Divyansh Mangal added 2 comments

Commit Message
Line 8, Patchset 16:`SVGDocumentResourcTracker`
Virali Purbey . resolved

nit: `SVGDocumentResourceTracker`

Divyansh Mangal

Done

Line 35, Patchset 16:3) Cleanup of `SVGDocumentResourcTracker` is now the responsibility
Virali Purbey . resolved

nit: `SVGDocumentResourceTracker`

Divyansh Mangal

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Vinay Singh
  • Virali Purbey
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: I96093a7d3a415eafaff25344850dabca746ce0c4
Gerrit-Change-Number: 7239586
Gerrit-PatchSet: 17
Gerrit-Owner: Divyansh Mangal <dma...@microsoft.com>
Gerrit-Reviewer: Divyansh Mangal <dma...@microsoft.com>
Gerrit-Reviewer: Vinay Singh <vinay...@microsoft.com>
Gerrit-Reviewer: Virali Purbey <virali...@microsoft.com>
Gerrit-CC: Dileep Maurya <dileep...@microsoft.com>
Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
Gerrit-CC: Fredrik Söderquist <f...@opera.com>
Gerrit-CC: Gaurav Kumar <gaur...@microsoft.com>
Gerrit-CC: Ragvesh Sharma <rags...@microsoft.com>
Gerrit-CC: Sejal Anand <sejal...@microsoft.com>
Gerrit-CC: Stephen Chenney <sche...@chromium.org>
Gerrit-Attention: Vinay Singh <vinay...@microsoft.com>
Gerrit-Attention: Virali Purbey <virali...@microsoft.com>
Gerrit-Comment-Date: Tue, 03 Feb 2026 08:30:31 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Virali Purbey <virali...@microsoft.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Divyansh Mangal (Gerrit)

unread,
Feb 3, 2026, 7:47:22 AM (5 days ago) Feb 3
to Vinay Singh, Virali Purbey, Sejal Anand, Dileep Maurya, Gaurav Kumar, Ragvesh Sharma, chrom...@appspot.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Dirk Schulze, Fredrik Söderquist, Stephen Chenney, blink-isola...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, fmalit...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, kouhe...@chromium.org, pdr+svgw...@chromium.org, scheduler-...@chromium.org
Attention needed from Vinay Singh and Virali Purbey

Divyansh Mangal added 8 comments

File third_party/blink/renderer/core/svg/svg_document_resource_tracker.h
Line 44, Patchset 16: // TODO(dmangal): Below constructor with cache identifier can be removed when
// feature `SvgPartitionSVGDocumentResourcesInMemoryCache` is fully launched.
Virali Purbey . resolved

The feature flag is marked as stable and still we mention we will remove this once feature is fully launched. Can you please add more details about this in the description?

Divyansh Mangal

Apologies for the confusion, I meant it would be safe to remove the constructor during feature flag removal (after two releases). There's a similar TODO at
https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/svg/svg_document_resource_tracker.h;drc=0047c18af00c7f8cb2e93d6084158e70720b5ed5;l=71

(I don't think this is needed to be mentioned in the description for this CL, but I have rephrased the comment to better reflect this understanding)

File third_party/blink/renderer/core/svg/svg_document_resource_tracker.cc
Line 36, Patchset 16:String GenerateGUID() {
Virali Purbey . resolved

Can we rename it as `GenerateCacheIdentifier()`?

Divyansh Mangal

Sounds good

Line 99, Patchset 16:void SVGDocumentResourceTracker::ClearTracker() {
Virali Purbey . unresolved

Can we add a DCHECK to see if `entries_` are empty?

Divyansh Mangal

`entries_` member will eventually be removed (during feature flag removal), and it will definitely be empty when feature flag is on, so I think this check will be redundant, but let me know if you think otherwise.

File third_party/blink/renderer/core/svg/svg_resource_document_content.cc
Line 296, Patchset 16: if (!registry->HasTrackerForScheduler(agent_group_scheduler)) {
Virali Purbey . unresolved

We always have to check if the scheduler has tracker, return it otherwise create it. Can we move this logic to registry itself to avoid duplicate code and call it `GetOrCreateTrackerForScheduler()`?

Divyansh Mangal

This was a little tricky due to the dependency problem discussed in https://chromium-review.googlesource.com/c/chromium/src/+/7239586/comment/b75d9fdf_5a3d4509/

but a template function came handy here, let me know what you think of this?

File third_party/blink/renderer/core/svg/svg_resource_document_content_test.cc
Line 34, Patchset 16: *SVGResourceSchedulerRegistry::Get()->GetTrackerForScheduler(
Virali Purbey . unresolved

Since this is a singleton class, can we have `ClearForTesting()` to clear scheduler_tracker_map_ (guarded under test build flags) or provide a way to destroy/recreate the singleton in tests.

Divyansh Mangal

`SVGResourceSchedulerRegistry` is garbage collected so I believe it should clear the memory during destruction,

The main reason I don't want to create explicit `ClearForTesting` was to make sure that we are clearing/unregistring the tracker at the correct place. Currently the unregistration is done at `AgentGroupScheduler::Dispose()`, if the tests require such clearing explicitly they can be added but for now i believe it should be ok to have this as-is. Let me know if you want to discuss on this further.

File third_party/blink/renderer/platform/scheduler/main_thread/svg_resource_scheduler_registry.cc
Line 16, Patchset 16:SVGResourceSchedulerRegistry* SVGResourceSchedulerRegistry::Get() {
Virali Purbey . resolved

Can we add a `DCHECK(IsMainThread())` in these functions (`Get()`, `RegisterSchedulerTracker()`, `UnregisterScheduler()`, `GetTrackerForScheduler()`) as we will be calling these from main thread?

Divyansh Mangal

Done

Line 33, Patchset 16:void SVGResourceSchedulerRegistry::RegisterSchedulerTracker(
Virali Purbey . resolved

I know we are checking if `scheduler_tracker_map_` contains has any tracker for scheduler but can we add a DCHECK ` DCHECK(!scheduler_tracker_map_.Contains(scheduler))` to make sure that we are never overridding the value?

Divyansh Mangal

Done

File third_party/blink/renderer/platform/scheduler/public/svg_document_resource_tracker_base.h
Line 13, Patchset 16:class PLATFORM_EXPORT SVGDocumentResourceTrackerBase
Virali Purbey . unresolved

Was there a specific need to create a base class here?

Divyansh Mangal

`svg_dcoument_resource_tracker` is in `core` directory whereas our new class `svg_resource_scheduler_registry` is at `platform` directory, by design
no class of `core` can be used in `platform` (it ends up created cyclic dependencies and linking errors). But vice-versa, that is classes in `platform` can be freely used in `core`.

As such to go around this problem, I created this base class, and made the already exisiting `svg_document_resource_tracker` inherited from it, so that
`AgentGroupScheduler` and `SVGDocumentResourceTrackerBase` can instead be used as key-value pair in registry without any linking errors.


This was one way to go around the dependency issue that I could think of, let me know if you want to discuss on this.

Open in Gerrit

Related details

Attention is currently required from:
  • Vinay Singh
  • Virali Purbey
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: I96093a7d3a415eafaff25344850dabca746ce0c4
Gerrit-Change-Number: 7239586
Gerrit-PatchSet: 18
Gerrit-Owner: Divyansh Mangal <dma...@microsoft.com>
Gerrit-Reviewer: Divyansh Mangal <dma...@microsoft.com>
Gerrit-Reviewer: Vinay Singh <vinay...@microsoft.com>
Gerrit-Reviewer: Virali Purbey <virali...@microsoft.com>
Gerrit-CC: Dileep Maurya <dileep...@microsoft.com>
Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
Gerrit-CC: Fredrik Söderquist <f...@opera.com>
Gerrit-CC: Gaurav Kumar <gaur...@microsoft.com>
Gerrit-CC: Ragvesh Sharma <rags...@microsoft.com>
Gerrit-CC: Sejal Anand <sejal...@microsoft.com>
Gerrit-CC: Stephen Chenney <sche...@chromium.org>
Gerrit-Attention: Vinay Singh <vinay...@microsoft.com>
Gerrit-Attention: Virali Purbey <virali...@microsoft.com>
Gerrit-Comment-Date: Tue, 03 Feb 2026 12:46:47 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Vinay Singh (Gerrit)

unread,
Feb 4, 2026, 5:16:08 AM (4 days ago) Feb 4
to Divyansh Mangal, Virali Purbey, Sejal Anand, Dileep Maurya, Gaurav Kumar, Ragvesh Sharma, chrom...@appspot.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Dirk Schulze, Fredrik Söderquist, Stephen Chenney, blink-isola...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, fmalit...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, kouhe...@chromium.org, pdr+svgw...@chromium.org, scheduler-...@chromium.org
Attention needed from Divyansh Mangal and Virali Purbey

Vinay Singh added 5 comments

File third_party/blink/renderer/core/svg/svg_resource_document_content.cc
Line 297, Patchset 19 (Latest): registry->GetOrCreateTrackerForScheduler(
agent_group_scheduler, [&page]() {
return MakeGarbageCollected<SVGDocumentResourceTracker>(
page->GetPageScheduler()
->GetAgentGroupScheduler()
.DefaultTaskRunner());
Vinay Singh . unresolved
```
auto task_runner = page->GetPageScheduler()
->GetAgentGroupScheduler()
.DefaultTaskRunner();
registry->GetOrCreateTrackerForScheduler(
agent_group_scheduler,
[task_runner]() {
return MakeGarbageCollected<SVGDocumentResourceTracker>(task_runner);
});
```

Looks slightly cleaner.
Also, `GetOrCreateTrackerForScheduler` is no longer susceptible to hold a lamba with page reference param.

Line 308, Patchset 19 (Latest): auto& cache = *tracker;
Vinay Singh . unresolved

Let's keep the `tracker` only. No need of additional `cache` variable.

File third_party/blink/renderer/platform/scheduler/main_thread/svg_resource_scheduler_registry.h
Line 61, Patchset 19 (Latest): if (SVGDocumentResourceTrackerBase* tracker =
GetTrackerForScheduler(scheduler)) {
return tracker;
}
SVGDocumentResourceTrackerBase* new_tracker = create_tracker();
RegisterSchedulerTracker(scheduler, new_tracker);
return new_tracker;
Vinay Singh . unresolved
```suggestion
SVGDocumentResourceTrackerBase* tracker = GetTrackerForScheduler(scheduler)
if (!tracker) {
tracker = create_tracker();
RegisterSchedulerTracker(scheduler, tracker );
}

return tracker;
```
Line 20, Patchset 19 (Latest):// SVGDocumentResourceTracker instances. This enables coordinated resource
// loading and scheduling for SVG documents within each agent group.
Vinay Singh . unresolved

Consider "This ties the SVG resource lifecycle with the AgentGroupScheduler."
Feel free to use your judgement though.

File third_party/blink/renderer/platform/scheduler/main_thread/svg_resource_scheduler_registry.cc
Line 63, Patchset 19 (Latest): return it != scheduler_tracker_map_.end() ? it->value : nullptr;
Vinay Singh . unresolved

Make sure the code has enough defensive checks in case this returns `nullptr`

Open in Gerrit

Related details

Attention is currently required from:
  • Divyansh Mangal
  • Virali Purbey
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: I96093a7d3a415eafaff25344850dabca746ce0c4
Gerrit-Change-Number: 7239586
Gerrit-PatchSet: 19
Gerrit-Owner: Divyansh Mangal <dma...@microsoft.com>
Gerrit-Reviewer: Divyansh Mangal <dma...@microsoft.com>
Gerrit-Reviewer: Vinay Singh <vinay...@microsoft.com>
Gerrit-Reviewer: Virali Purbey <virali...@microsoft.com>
Gerrit-CC: Dileep Maurya <dileep...@microsoft.com>
Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
Gerrit-CC: Fredrik Söderquist <f...@opera.com>
Gerrit-CC: Gaurav Kumar <gaur...@microsoft.com>
Gerrit-CC: Ragvesh Sharma <rags...@microsoft.com>
Gerrit-CC: Sejal Anand <sejal...@microsoft.com>
Gerrit-CC: Stephen Chenney <sche...@chromium.org>
Gerrit-Attention: Virali Purbey <virali...@microsoft.com>
Gerrit-Attention: Divyansh Mangal <dma...@microsoft.com>
Gerrit-Comment-Date: Wed, 04 Feb 2026 10:15:36 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Divyansh Mangal (Gerrit)

unread,
Feb 5, 2026, 7:59:11 AM (3 days ago) Feb 5
to Vinay Singh, Virali Purbey, Sejal Anand, Dileep Maurya, Gaurav Kumar, Ragvesh Sharma, chrom...@appspot.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Dirk Schulze, Fredrik Söderquist, Stephen Chenney, blink-isola...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, fmalit...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, kouhe...@chromium.org, pdr+svgw...@chromium.org, scheduler-...@chromium.org
Attention needed from Vinay Singh and Virali Purbey

Divyansh Mangal added 5 comments

File third_party/blink/renderer/core/svg/svg_resource_document_content.cc
Line 297, Patchset 19: registry->GetOrCreateTrackerForScheduler(

agent_group_scheduler, [&page]() {
return MakeGarbageCollected<SVGDocumentResourceTracker>(
page->GetPageScheduler()
->GetAgentGroupScheduler()
.DefaultTaskRunner());
Vinay Singh . resolved
```
auto task_runner = page->GetPageScheduler()
->GetAgentGroupScheduler()
.DefaultTaskRunner();
registry->GetOrCreateTrackerForScheduler(
agent_group_scheduler,
[task_runner]() {
return MakeGarbageCollected<SVGDocumentResourceTracker>(task_runner);
});
```

Looks slightly cleaner.
Also, `GetOrCreateTrackerForScheduler` is no longer susceptible to hold a lamba with page reference param.

Divyansh Mangal

Done

Line 308, Patchset 19: auto& cache = *tracker;
Vinay Singh . resolved

Let's keep the `tracker` only. No need of additional `cache` variable.

Divyansh Mangal

Done

File third_party/blink/renderer/platform/scheduler/main_thread/svg_resource_scheduler_registry.h
Line 61, Patchset 19: if (SVGDocumentResourceTrackerBase* tracker =

GetTrackerForScheduler(scheduler)) {
return tracker;
}
SVGDocumentResourceTrackerBase* new_tracker = create_tracker();
RegisterSchedulerTracker(scheduler, new_tracker);
return new_tracker;
Vinay Singh . resolved
```suggestion
SVGDocumentResourceTrackerBase* tracker = GetTrackerForScheduler(scheduler)
if (!tracker) {
tracker = create_tracker();
RegisterSchedulerTracker(scheduler, tracker );
}

return tracker;
```
Divyansh Mangal

Done

Line 20, Patchset 19:// SVGDocumentResourceTracker instances. This enables coordinated resource

// loading and scheduling for SVG documents within each agent group.
Vinay Singh . resolved

Consider "This ties the SVG resource lifecycle with the AgentGroupScheduler."
Feel free to use your judgement though.

Divyansh Mangal

Done

File third_party/blink/renderer/platform/scheduler/main_thread/svg_resource_scheduler_registry.cc
Line 63, Patchset 19: return it != scheduler_tracker_map_.end() ? it->value : nullptr;
Vinay Singh . resolved

Make sure the code has enough defensive checks in case this returns `nullptr`

Divyansh Mangal

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Vinay Singh
  • Virali Purbey
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: I96093a7d3a415eafaff25344850dabca746ce0c4
Gerrit-Change-Number: 7239586
Gerrit-PatchSet: 21
Gerrit-Owner: Divyansh Mangal <dma...@microsoft.com>
Gerrit-Reviewer: Divyansh Mangal <dma...@microsoft.com>
Gerrit-Reviewer: Vinay Singh <vinay...@microsoft.com>
Gerrit-Reviewer: Virali Purbey <virali...@microsoft.com>
Gerrit-CC: Dileep Maurya <dileep...@microsoft.com>
Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
Gerrit-CC: Fredrik Söderquist <f...@opera.com>
Gerrit-CC: Gaurav Kumar <gaur...@microsoft.com>
Gerrit-CC: Ragvesh Sharma <rags...@microsoft.com>
Gerrit-CC: Sejal Anand <sejal...@microsoft.com>
Gerrit-CC: Stephen Chenney <sche...@chromium.org>
Gerrit-Attention: Vinay Singh <vinay...@microsoft.com>
Gerrit-Attention: Virali Purbey <virali...@microsoft.com>
Gerrit-Comment-Date: Thu, 05 Feb 2026 12:58:40 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Vinay Singh <vinay...@microsoft.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Divyansh Mangal (Gerrit)

unread,
Feb 6, 2026, 6:45:07 AM (2 days ago) Feb 6
to Fredrik Söderquist, Vinay Singh, Virali Purbey, Sejal Anand, Dileep Maurya, Gaurav Kumar, Ragvesh Sharma, chrom...@appspot.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Dirk Schulze, Stephen Chenney, blink-isola...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, fmalit...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, kouhe...@chromium.org, pdr+svgw...@chromium.org, scheduler-...@chromium.org
Attention needed from Fredrik Söderquist, Vinay Singh and Virali Purbey

Divyansh Mangal voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Fredrik Söderquist
  • Vinay Singh
  • Virali Purbey
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: I96093a7d3a415eafaff25344850dabca746ce0c4
Gerrit-Change-Number: 7239586
Gerrit-PatchSet: 21
Gerrit-Owner: Divyansh Mangal <dma...@microsoft.com>
Gerrit-Reviewer: Divyansh Mangal <dma...@microsoft.com>
Gerrit-Reviewer: Fredrik Söderquist <f...@opera.com>
Gerrit-Reviewer: Vinay Singh <vinay...@microsoft.com>
Gerrit-Reviewer: Virali Purbey <virali...@microsoft.com>
Gerrit-CC: Dileep Maurya <dileep...@microsoft.com>
Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
Gerrit-CC: Gaurav Kumar <gaur...@microsoft.com>
Gerrit-CC: Ragvesh Sharma <rags...@microsoft.com>
Gerrit-CC: Sejal Anand <sejal...@microsoft.com>
Gerrit-CC: Stephen Chenney <sche...@chromium.org>
Gerrit-Attention: Vinay Singh <vinay...@microsoft.com>
Gerrit-Attention: Virali Purbey <virali...@microsoft.com>
Gerrit-Attention: Fredrik Söderquist <f...@opera.com>
Gerrit-Comment-Date: Fri, 06 Feb 2026 11:44:37 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Fredrik Söderquist (Gerrit)

unread,
Feb 6, 2026, 8:01:12 AM (2 days ago) Feb 6
to Divyansh Mangal, Vinay Singh, Virali Purbey, Sejal Anand, Dileep Maurya, Gaurav Kumar, Ragvesh Sharma, chrom...@appspot.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Dirk Schulze, Stephen Chenney, blink-isola...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, fmalit...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, kouhe...@chromium.org, pdr+svgw...@chromium.org, scheduler-...@chromium.org
Attention needed from Divyansh Mangal, Vinay Singh and Virali Purbey

Fredrik Söderquist added 4 comments

File third_party/blink/renderer/core/svg/svg_resource_document_content.cc
Line 290, Patchset 21 (Latest): if (RuntimeEnabledFeatures::
SvgPartitionSVGDocumentResourcesInMemoryCacheEnabled()) {
AgentGroupScheduler* agent_group_scheduler =
&page->GetAgentGroupScheduler();
auto* registry = SVGResourceSchedulerRegistry::Get();
auto task_runner =
page->GetPageScheduler()->GetAgentGroupScheduler().DefaultTaskRunner();

tracker = static_cast<SVGDocumentResourceTracker*>(

registry->GetOrCreateTrackerForScheduler(
agent_group_scheduler, [task_runner]() {
return MakeGarbageCollected<SVGDocumentResourceTracker>(
task_runner);
}));
} else {
tracker = &page->GetSVGDocumentResourceTracker();
}
Fredrik Söderquist . unresolved

You could use a technique similar to what you do in the test here as well. To allow keeping it a reference.

File third_party/blink/renderer/platform/scheduler/main_thread/svg_resource_scheduler_registry.h
File-level comment, Patchset 21 (Latest):
Fredrik Söderquist . unresolved

We shouldn't have anything "SVG" in `platform/`. Prefer weak coupling instead. It might also be possible to just observe garbage collection as well.

File third_party/blink/renderer/platform/scheduler/main_thread/svg_resource_scheduler_registry.cc
Line 13, Patchset 21 (Latest):static Persistent<SVGResourceSchedulerRegistry>*
g_svg_resource_scheduler_registry;
Fredrik Söderquist . unresolved

Use `DEFINE_STATIC_LOCAL` in function scope instead if you need a global like this.

Line 49, Patchset 21 (Latest): if (!HasTrackerForScheduler(scheduler)) {
return;
}

GetTrackerForScheduler(scheduler)->ClearTracker();
scheduler_tracker_map_.erase(scheduler);
Fredrik Söderquist . unresolved

This has three hash-lookups when it could have one.

Open in Gerrit

Related details

Attention is currently required from:
  • Divyansh Mangal
  • Vinay Singh
  • Virali Purbey
Gerrit-Attention: Divyansh Mangal <dma...@microsoft.com>
Gerrit-Comment-Date: Fri, 06 Feb 2026 13:00:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

chromeperf@appspot.gserviceaccount.com (Gerrit)

unread,
Feb 6, 2026, 5:31:09 PM (2 days ago) Feb 6
to Divyansh Mangal, Fredrik Söderquist, Vinay Singh, Virali Purbey, Sejal Anand, Dileep Maurya, Gaurav Kumar, Ragvesh Sharma, Chromium LUCI CQ, chromium...@chromium.org, Dirk Schulze, Stephen Chenney, blink-isola...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, fmalit...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, kouhe...@chromium.org, pdr+svgw...@chromium.org, scheduler-...@chromium.org
Attention needed from Divyansh Mangal, Vinay Singh and Virali Purbey

Message from chrom...@appspot.gserviceaccount.com

📍 Job mac-m1_mini_2020-perf/speedometer3 complete.

See results at: https://pinpoint-dot-chromeperf.appspot.com/job/1755067b710000

Gerrit-Comment-Date: Fri, 06 Feb 2026 22:30:59 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

chromeperf@appspot.gserviceaccount.com (Gerrit)

unread,
6:17 AM (9 hours ago) 6:17 AM
to Divyansh Mangal, Fredrik Söderquist, Vinay Singh, Virali Purbey, Sejal Anand, Dileep Maurya, Gaurav Kumar, Ragvesh Sharma, Chromium LUCI CQ, chromium...@chromium.org, Dirk Schulze, Stephen Chenney, blink-isola...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, fmalit...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, kouhe...@chromium.org, pdr+svgw...@chromium.org, scheduler-...@chromium.org
Attention needed from Divyansh Mangal, Vinay Singh and Virali Purbey

Message from chrom...@appspot.gserviceaccount.com

📍 Job mac-m1_mini_2020-perf/speedometer3 complete.

See results at: https://pinpoint-dot-chromeperf.appspot.com/job/12b9a960f10000

Open in Gerrit

Related details

Attention is currently required from:
  • Divyansh Mangal
  • Vinay Singh
  • Virali Purbey
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: I96093a7d3a415eafaff25344850dabca746ce0c4
Gerrit-Change-Number: 7239586
Gerrit-PatchSet: 23
Gerrit-Owner: Divyansh Mangal <dma...@microsoft.com>
Gerrit-Reviewer: Divyansh Mangal <dma...@microsoft.com>
Gerrit-Reviewer: Fredrik Söderquist <f...@opera.com>
Gerrit-Reviewer: Vinay Singh <vinay...@microsoft.com>
Gerrit-Reviewer: Virali Purbey <virali...@microsoft.com>
Gerrit-CC: Dileep Maurya <dileep...@microsoft.com>
Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
Gerrit-CC: Gaurav Kumar <gaur...@microsoft.com>
Gerrit-CC: Ragvesh Sharma <rags...@microsoft.com>
Gerrit-CC: Sejal Anand <sejal...@microsoft.com>
Gerrit-CC: Stephen Chenney <sche...@chromium.org>
Gerrit-Attention: Vinay Singh <vinay...@microsoft.com>
Gerrit-Attention: Virali Purbey <virali...@microsoft.com>
Gerrit-Attention: Divyansh Mangal <dma...@microsoft.com>
Gerrit-Comment-Date: Sun, 08 Feb 2026 11:17:39 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

chromeperf@appspot.gserviceaccount.com (Gerrit)

unread,
6:19 AM (9 hours ago) 6:19 AM
to Divyansh Mangal, Fredrik Söderquist, Vinay Singh, Virali Purbey, Sejal Anand, Dileep Maurya, Gaurav Kumar, Ragvesh Sharma, Chromium LUCI CQ, chromium...@chromium.org, Dirk Schulze, Stephen Chenney, blink-isola...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, fmalit...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, kouhe...@chromium.org, pdr+svgw...@chromium.org, scheduler-...@chromium.org
Attention needed from Divyansh Mangal, Vinay Singh and Virali Purbey

Message from chrom...@appspot.gserviceaccount.com

📍 Job mac-m1_mini_2020-perf/speedometer3 complete.

See results at: https://pinpoint-dot-chromeperf.appspot.com/job/11c4a3ad710000

Gerrit-Comment-Date: Sun, 08 Feb 2026 11:19:11 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

chromeperf@appspot.gserviceaccount.com (Gerrit)

unread,
6:21 AM (9 hours ago) 6:21 AM
to Divyansh Mangal, Fredrik Söderquist, Vinay Singh, Virali Purbey, Sejal Anand, Dileep Maurya, Gaurav Kumar, Ragvesh Sharma, Chromium LUCI CQ, chromium...@chromium.org, Dirk Schulze, Stephen Chenney, blink-isola...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, fmalit...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, kouhe...@chromium.org, pdr+svgw...@chromium.org, scheduler-...@chromium.org
Attention needed from Divyansh Mangal, Vinay Singh and Virali Purbey

Message from chrom...@appspot.gserviceaccount.com

📍 Job mac-m1_mini_2020-perf/speedometer3 complete.

See results at: https://pinpoint-dot-chromeperf.appspot.com/job/12909d64f10000

Gerrit-Comment-Date: Sun, 08 Feb 2026 11:20:59 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

chromeperf@appspot.gserviceaccount.com (Gerrit)

unread,
6:23 AM (9 hours ago) 6:23 AM
to Divyansh Mangal, Fredrik Söderquist, Vinay Singh, Virali Purbey, Sejal Anand, Dileep Maurya, Gaurav Kumar, Ragvesh Sharma, Chromium LUCI CQ, chromium...@chromium.org, Dirk Schulze, Stephen Chenney, blink-isola...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, fmalit...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, kouhe...@chromium.org, pdr+svgw...@chromium.org, scheduler-...@chromium.org
Attention needed from Divyansh Mangal, Vinay Singh and Virali Purbey

Message from chrom...@appspot.gserviceaccount.com

📍 Job mac-m1_mini_2020-perf/speedometer3 complete.

See results at: https://pinpoint-dot-chromeperf.appspot.com/job/173c99ad710000

Gerrit-Comment-Date: Sun, 08 Feb 2026 11:23:32 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

chromeperf@appspot.gserviceaccount.com (Gerrit)

unread,
6:23 AM (9 hours ago) 6:23 AM
to Divyansh Mangal, Fredrik Söderquist, Vinay Singh, Virali Purbey, Sejal Anand, Dileep Maurya, Gaurav Kumar, Ragvesh Sharma, Chromium LUCI CQ, chromium...@chromium.org, Dirk Schulze, Stephen Chenney, blink-isola...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, fmalit...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, kouhe...@chromium.org, pdr+svgw...@chromium.org, scheduler-...@chromium.org
Attention needed from Divyansh Mangal, Vinay Singh and Virali Purbey

Message from chrom...@appspot.gserviceaccount.com

📍 Job mac-m1_mini_2020-perf/speedometer3 complete.

See results at: https://pinpoint-dot-chromeperf.appspot.com/job/17f48e54f10000

Gerrit-Comment-Date: Sun, 08 Feb 2026 11:23:38 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Divyansh Mangal (Gerrit)

unread,
7:05 AM (8 hours ago) 7:05 AM
to Fredrik Söderquist, Vinay Singh, Virali Purbey, Sejal Anand, Dileep Maurya, Gaurav Kumar, Ragvesh Sharma, chrom...@appspot.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Dirk Schulze, Stephen Chenney, blink-isola...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, fmalit...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, kouhe...@chromium.org, pdr+svgw...@chromium.org, scheduler-...@chromium.org
Attention needed from Fredrik Söderquist, Vinay Singh and Virali Purbey

Divyansh Mangal added 3 comments

File third_party/blink/renderer/core/svg/svg_resource_document_content.cc
Line 290, Patchset 21: if (RuntimeEnabledFeatures::

SvgPartitionSVGDocumentResourcesInMemoryCacheEnabled()) {
AgentGroupScheduler* agent_group_scheduler =
&page->GetAgentGroupScheduler();
auto* registry = SVGResourceSchedulerRegistry::Get();
auto task_runner =
page->GetPageScheduler()->GetAgentGroupScheduler().DefaultTaskRunner();

tracker = static_cast<SVGDocumentResourceTracker*>(
registry->GetOrCreateTrackerForScheduler(
agent_group_scheduler, [task_runner]() {
return MakeGarbageCollected<SVGDocumentResourceTracker>(
task_runner);
}));
} else {
tracker = &page->GetSVGDocumentResourceTracker();
}
Fredrik Söderquist . resolved

You could use a technique similar to what you do in the test here as well. To allow keeping it a reference.

Divyansh Mangal

Done

File third_party/blink/renderer/platform/scheduler/main_thread/svg_resource_scheduler_registry.cc
Line 13, Patchset 21:static Persistent<SVGResourceSchedulerRegistry>*
g_svg_resource_scheduler_registry;
Fredrik Söderquist . resolved

Use `DEFINE_STATIC_LOCAL` in function scope instead if you need a global like this.

Divyansh Mangal

Done

Line 49, Patchset 21: if (!HasTrackerForScheduler(scheduler)) {
return;
}

GetTrackerForScheduler(scheduler)->ClearTracker();
scheduler_tracker_map_.erase(scheduler);
Fredrik Söderquist . resolved

This has three hash-lookups when it could have one.

Divyansh Mangal

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Fredrik Söderquist
  • Vinay Singh
  • Virali Purbey
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: I96093a7d3a415eafaff25344850dabca746ce0c4
Gerrit-Change-Number: 7239586
Gerrit-PatchSet: 24
Gerrit-Owner: Divyansh Mangal <dma...@microsoft.com>
Gerrit-Reviewer: Divyansh Mangal <dma...@microsoft.com>
Gerrit-Reviewer: Fredrik Söderquist <f...@opera.com>
Gerrit-Reviewer: Vinay Singh <vinay...@microsoft.com>
Gerrit-Reviewer: Virali Purbey <virali...@microsoft.com>
Gerrit-CC: Dileep Maurya <dileep...@microsoft.com>
Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
Gerrit-CC: Gaurav Kumar <gaur...@microsoft.com>
Gerrit-CC: Ragvesh Sharma <rags...@microsoft.com>
Gerrit-CC: Sejal Anand <sejal...@microsoft.com>
Gerrit-CC: Stephen Chenney <sche...@chromium.org>
Gerrit-Attention: Vinay Singh <vinay...@microsoft.com>
Gerrit-Attention: Virali Purbey <virali...@microsoft.com>
Gerrit-Attention: Fredrik Söderquist <f...@opera.com>
Gerrit-Comment-Date: Sun, 08 Feb 2026 12:04:33 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Fredrik Söderquist <f...@opera.com>
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages