Background compile JS extension scripts injected at document start [chromium/src : main]

0 views
Skip to first unread message

Luis Pardo (Gerrit)

unread,
Oct 10, 2025, 4:22:54 PM (5 days ago) Oct 10
to Devlin Cronin, Chromium LUCI CQ, Chromium Metrics Reviews, Kentaro Hara, Raphael Kubo da Costa, chromium...@chromium.org, AyeAye, asvitkine...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, blink-revi...@chromium.org
Attention needed from Devlin Cronin

Luis Pardo voted and added 2 comments

Votes added by Luis Pardo

Commit-Queue+1

2 comments

Patchset-level comments
File-level comment, Patchset 10 (Latest):
Luis Pardo . resolved

@rdevlin...@chromium.org Can you take a look at this feature? Here is the related [design doc](https://docs.google.com/document/d/1gryv6WZItlP5VbuOwL9VtNnjbM8yvvFpEPnELXWGM9E/edit?usp=sharing). Also linked in the bug.

File extensions/renderer/script_injection_manager.cc
Line 521, Patchset 10 (Latest): // TODO(https://crbug.com/436274244): filter out frames that will not have any
// script injections.
Luis Pardo . unresolved

@rdevlin...@chromium.org Any suggestions on how to address this? It would be nice to only do this work once, so maybe refactoring to fill the pending injections here?

Open in Gerrit

Related details

Attention is currently required from:
  • Devlin Cronin
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: Idc6fc4e4f0a57f197ccba6ef04a77bba58c0ec8e
Gerrit-Change-Number: 6820371
Gerrit-PatchSet: 10
Gerrit-Owner: Luis Pardo <lpardo...@microsoft.com>
Gerrit-Reviewer: Devlin Cronin <rdevlin...@chromium.org>
Gerrit-Reviewer: Luis Pardo <lpardo...@microsoft.com>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
Gerrit-Attention: Devlin Cronin <rdevlin...@chromium.org>
Gerrit-Comment-Date: Fri, 10 Oct 2025 20:22:32 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Devlin Cronin (Gerrit)

unread,
Oct 14, 2025, 8:01:00 PM (yesterday) Oct 14
to Luis Pardo, Devlin Cronin, Chromium LUCI CQ, Chromium Metrics Reviews, Kentaro Hara, Raphael Kubo da Costa, chromium...@chromium.org, AyeAye, asvitkine...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, blink-revi...@chromium.org
Attention needed from Devlin Cronin and Luis Pardo

Devlin Cronin added 1 comment

Patchset-level comments
Devlin Cronin . unresolved

Thanks for the CL! Sorry, I haven't had a chance to get to this yet, but I hope to tomorrow.

One of the concerns I have here is that it seems like this would be difficult to determine if it's a net performance improvement. Moving the compilation to a background thread seems like it has the potential to slow down the compilation of document_start scripts, but since we block the page on the injection of document_start scripts, that would mean we block page load on that.

Is there a rollout plan to ensure we'll measure the impact of this and that we're not regressing any other important metrics?

Open in Gerrit

Related details

Attention is currently required from:
  • Devlin Cronin
  • Luis Pardo
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: Idc6fc4e4f0a57f197ccba6ef04a77bba58c0ec8e
Gerrit-Change-Number: 6820371
Gerrit-PatchSet: 10
Gerrit-Owner: Luis Pardo <lpardo...@microsoft.com>
Gerrit-Reviewer: Devlin Cronin <rdevlin...@chromium.org>
Gerrit-Reviewer: Luis Pardo <lpardo...@microsoft.com>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
Gerrit-Attention: Devlin Cronin <rdevlin...@chromium.org>
Gerrit-Attention: Luis Pardo <lpardo...@microsoft.com>
Gerrit-Comment-Date: Wed, 15 Oct 2025 00:00:31 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Luis Pardo (Gerrit)

unread,
12:29 PM (9 hours ago) 12:29 PM
to Devlin Cronin, Chromium LUCI CQ, Chromium Metrics Reviews, Kentaro Hara, Raphael Kubo da Costa, chromium...@chromium.org, AyeAye, asvitkine...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, blink-revi...@chromium.org
Attention needed from Devlin Cronin

Luis Pardo added 1 comment

Patchset-level comments
Devlin Cronin . unresolved

Thanks for the CL! Sorry, I haven't had a chance to get to this yet, but I hope to tomorrow.

One of the concerns I have here is that it seems like this would be difficult to determine if it's a net performance improvement. Moving the compilation to a background thread seems like it has the potential to slow down the compilation of document_start scripts, but since we block the page on the injection of document_start scripts, that would mean we block page load on that.

Is there a rollout plan to ensure we'll measure the impact of this and that we're not regressing any other important metrics?

Luis Pardo

I added an [experimentation plan section](https://docs.google.com/document/d/1gryv6WZItlP5VbuOwL9VtNnjbM8yvvFpEPnELXWGM9E/edit?tab=t.0) to the design doc. We'll run an experiment with First Contentful Paint as the success metric, this should catch any regressions on page load, we are also adding other metrics for parameter tunning. I don't think I can run finch trials in Chrome, so I'm setting up the infrastructure in this CL and I'll run the experiment on Edge, it would be great if someone could run the in the Chrome side too.

Open in Gerrit

Related details

Attention is currently required from:
  • Devlin Cronin
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: Idc6fc4e4f0a57f197ccba6ef04a77bba58c0ec8e
Gerrit-Change-Number: 6820371
Gerrit-PatchSet: 10
Gerrit-Owner: Luis Pardo <lpardo...@microsoft.com>
Gerrit-Reviewer: Devlin Cronin <rdevlin...@chromium.org>
Gerrit-Reviewer: Luis Pardo <lpardo...@microsoft.com>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
Gerrit-Attention: Devlin Cronin <rdevlin...@chromium.org>
Gerrit-Comment-Date: Wed, 15 Oct 2025 16:28:57 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Devlin Cronin <rdevlin...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages