Track webextension Javascript activity

NEW
Assigned to

Status

()

4 months ago
2 months ago

People

(Reporter: tarek, Assigned: tarek)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 obsolete attachment)

(Assignee)

Description

4 months ago
Let's add a counter that will receive duration values and event loop iterations (==dispatches), 
so we know how long a webext spends in the JS runtime.

current implementation plan:

- add a global hashtable [WebExtensionId / duration+dispatch] 
- add in the runtime performanceMonitoring a set of functions so we can label it with the WebExtensionId
- in XPCJSRuntime::Initialize, if the principal has an addonId, create an entry in the table and flag the context runtime with it
- in AutoStopwatch, if the cx is flagged, we can measure the time spent via enter/leave (and iterations)

For the consumers, create a promise that asks all processes their global hashtable, and returns a merged, JS-friendly array, exposed via the extension framework.
(Assignee)

Comment 1

4 months ago
related : bug 1309946 - which was the previous implementation of the "This addon might slow down etc..."
(Assignee)

Comment 2

3 months ago
related : bug 1406872 -- it can probably be done in the same patch
(Assignee)

Comment 3

3 months ago
Created attachment 9008324 [details]
Bug 1482392 - Track Web Extensions Javascript activity - r?jandem,baku,florian

This is a first draft for the patch that tracks WebExtension JS
activity, for early feedback.
Attachment #9008324 - Attachment description: Bug 1482392 - [WIP] Track webextension Javascript activity - r?jandem → Bug 1482392 - Track Web Extensions Javascript activity - r?jandem
Attachment #9008324 - Attachment description: Bug 1482392 - Track Web Extensions Javascript activity - r?jandem → Bug 1482392 - Track Web Extensions Javascript activity - r?jandem,florian
Attachment #9008324 - Attachment description: Bug 1482392 - Track Web Extensions Javascript activity - r?jandem,florian → Bug 1482392 - Track Web Extensions Javascript activity - r?jandem,baku,florian
Attachment #9008324 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.