Open
Bug 1476641
Opened 6 years ago
Updated 3 years ago
WEBEXT_CONTENT_SCRIPT_INJECTION_MS telemetry probe also measures non-script (style-only) "content scripts"
Categories
(WebExtensions :: General, enhancement, P3)
WebExtensions
General
Tracking
(Not tracked)
NEW
People
(Reporter: robwu, Assigned: zombie)
References
(Blocks 1 open bug)
Details
The Script class [1] is used for the following purposes:
Scripts:
- Static scripts (content_scripts[*].js in manifest.json, and contentScripts.register).
- One-time scripts (tabs.executeScript).
Style sheets:
- Static style sheet (content_scripts[*].css in manifest.json, and contentScripts.register).
- Add style sheet once (tabs.insertCSS).
- Remove style sheet (tabs.removeCSS).
The WEBEXT_CONTENT_SCRIPT_INJECTION_MS telemetry probe from is supposed to measure the execution time of content scripts. But the current implementation does not limit the measurement to scripts only.
I think that we should ignore all style-only "content scripts".
[1] https://searchfox.org/mozilla-central/rev/c296d5b2391c8b37374b118180b64cca66c0aa16/toolkit/components/extensions/ExtensionContent.jsm#276
Reporter | ||
Comment 1•6 years ago
|
||
> But the current implementation does not limit the measurement to scripts only.
For clarity, this is the logic that measures the time of execution:
https://searchfox.org/mozilla-central/rev/c296d5b2391c8b37374b118180b64cca66c0aa16/toolkit/components/extensions/ExtensionContent.jsm#486-496
Before that code block, there is logic to add/remove CSS if needed, and/or parse the script (before executing it later).
The telemetry probe only measures the execution of scripts (potentially multiple, in case of static scripts...), but there is currently no guarantee that there are any scripts to execute.
Updated•6 years ago
|
Priority: -- → P2
Assignee | ||
Updated•5 years ago
|
Assignee: nobody → tomica
Assignee | ||
Updated•3 years ago
|
Severity: -- → N/A
Priority: -- → P3
You need to log in
before you can comment on or make changes to this bug.
Description
•