Closed Bug 1728245 Opened 3 years ago Closed 3 years ago

Add profiler markers on WebExtensions Schemas.load calls

Categories

(WebExtensions :: General, enhancement, P3)

enhancement

Tracking

(firefox94 fixed)

RESOLVED FIXED
94 Branch
Tracking Status
firefox94 --- fixed

People

(Reporter: mcomella, Assigned: rpl)

References

Details

Attachments

(1 file)

In https://github.com/mozilla-mobile/fenix/issues/20934#issuecomment-903740408, it was determined that two web extensions' manifests were taking a long time to parse on start up and that was the cause for the regression. It seems like the root cause would have been more apparent if we had profiler markers that indicated that a WebExtension's manifest is being parsed with detail text that says which extension is being parsed; this could either be a single marker when parsing begins or a marker with a duration (parsing start/end). For example:

Extension.parseManifest
Details: webcompat@mozilla.org

Additionally, it could be useful to add markers for other major events in extensions during start up – unfortunately, I'm unfamiliar with the code so I can't be more specific.

Note: we have a TelemetryStopwatch - WEBEXT_EXTENSION_STARTUP_MS_BY_ADDONID:ads@mozac.org profiler maker but I'm not sure it's correct and what specifically it's describing.

Changing severity to S? because of <this is an enhancement>

Severity: -- → N/A
Priority: -- → P2
Priority: P2 → P3
Assignee: nobody → lgreco
Status: NEW → ASSIGNED

The marker on the telemetry stopwatch collected when we are starting an extension should also be useful for being able to identify which extension is starting through the related profile marker.

But a marked added from Schemas.load would have helped a lot to more easily identify the underlying issue in Bug 1728461.

The following are two profiles collected with the attached patch (along with Rob's patch from Bug 1728461):

Pushed by luca.greco@alcacoop.it: https://hg.mozilla.org/integration/autoland/rev/52ce21dcb6a2 Add profile marker on WebExtensions Schemas.load. r=florian
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 94 Branch
See Also: → 1728461

Update the bug summary to reflect the actual change landed.

Summary: Add profiler markers that describe which web extension is being initialized when on start up → Add profiler markers on WebExtensions Schemas.load calls
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: