Closed Bug 1317681 Opened 8 years ago Closed 7 years ago

Content script performances still look bad on talos

Categories

(WebExtensions :: General, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1363905

People

(Reporter: ochameau, Assigned: kmag)

References

Details

(Whiteboard: triaged)

Followup form bug 1312690.
tp5o responsiveness regression has been fixed. Going from >30% to 5%.
But there is still a significant performance impact of empty content script on the following test suites:

  * ts_paint - 15 to 23%
  * sessionrestore - 18 to 26%
  * tp5o responsiveness - 5 to 13%

And low impact on the following ones:
  * tabpaint - 5%
  * damp - 3 to 5%
  * tp5o - 2-3%
  * tpaint - 2-4%
  * tsvgx - 2-3%

I think ts_paint results are still an issue.
It looks like, in the case of sessionrestore, a huge chunk of the overhead is coming from the Intl code, which apparently flushes the timezone cache every time a new compartment is created, and then eagerly initializes the Intl object prototype, which synchronously reads the on-disk timezone data to get the default timezone.

Since we need to create an extra compartment for each content script, it means we wind up doing that a lot more.

I'll file a separate bug for that issue, and then see what remains once it's fixed.
Thanks for such level of investigation!
Priority: -- → P2
Whiteboard: triaged
kris has another patch for this
Assignee: nobody → kmaglione+bmo
Depends on: 1333197
With bug 1333197 fixed, the tp5o responsiveness overhead is down to about 2.5%, which I can live with.

There's still about 100-200ms of startup overhead, which is reflected in ts_paint and sessionrestore, but that happens regardless of whether content scripts are used.
Depends on: 1333201
Summary: Content script performances look still bad on talos → Content script performances still look bad on talos
(In reply to Kris Maglione [:kmag] from comment #5)
> With bug 1333197 fixed, the tp5o responsiveness overhead is down to about
> 2.5%, which I can live with.

Are any of these regressions cumulative, though? i.e. a 2.5% regression with one addon might not seem like a big deal, but 25% with 10 addons would.
(In reply to Justin Dolske [:Dolske] from comment #7)
> Are any of these regressions cumulative, though? i.e. a 2.5% regression with
> one addon might not seem like a big deal, but 25% with 10 addons would.

With the exception of the content script issues that have already been addressed, most of the overhead is fixed, not per-extension. We don't load or initialize most of the WebExtension code until the first time an extension is loaded, loading it for one extension is the same as loading it for a dozen.
Depends on: 1338409
Depends on: 1344590
Depends on: 1350522
Depends on: 1354941
Depends on: 1354945
Depends on: 1355201
No longer depends on: 1354945
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
No longer blocks: themingapi-performance
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.