Open Bug 1356825 (aom-startup-perf) Opened 3 years ago Updated 3 months ago

[meta] AddonManager startup is too slow

Categories

(Toolkit :: Add-ons Manager, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: kmag, Unassigned)

References

(Depends on 2 open bugs, Blocks 3 open bugs)

Details

(Keywords: meta, perf, Whiteboard: [qf:meta], triaged [fxperf])

AddonManager startup is the biggest single chunk of time we spend in JS at startup. A lot of this is in the system add-on bootstrap code that run, but a lot of it is overhead in the AOM itself.
Depends on: 1356826
Depends on: 1356827
Depends on: 1356828
Depends on: 1356852
Whiteboard: [qf] → [qf:meta]
Depends on: 1358907
Depends on: 1358914
Component: WebExtensions: General → Add-ons Manager
Priority: -- → P1
Whiteboard: [qf:meta] → [qf:meta], triaged
Depends on: 1362364
Blocks: webext-perf
Not sure if it's related, but if we could get a fast-path (or cache) of registered langpacks, we would save some time that we spend on language renegotiation that happens currently due to late registration of language resources.
(In reply to Zibi Braniecki [:gandalf][:zibi] from comment #1)
> Not sure if it's related, but if we could get a fast-path (or cache) of
> registered langpacks, we would save some time that we spend on language
> renegotiation that happens currently due to late registration of language
> resources.

I'd have to profile to see how much that would help, but if it would, we could probably make it happen after bug 1358846 lands.
Alias: aom-startup-perf
Depends on: 1363925
Depends on: 1365784
Keywords: meta
Depends on: 1371047
Depends on: 1377538
Depends on: 1389868
Keywords: perf
Whiteboard: [qf:meta], triaged → [qf:meta], triaged [fxperf]
https://perfht.ml/2BHa7nQ shows ~2.4s spent for add-on manager startup on a cold startup profile on a slow machine with a nightly from 2018-02-13. Hopefully this gives ideas about where there's still room for improvement.
(In reply to Florian Quèze [:florian] from comment #3)
> https://perfht.ml/2BHa7nQ shows ~2.4s spent for add-on manager startup on a
> cold startup profile on a slow machine with a nightly from 2018-02-13.
> Hopefully this gives ideas about where there's still room for improvement.

The vast majority of this is still from system add-ons, with the Form Auto-fill and Pocket being by far the worst.
Depends on: 1456262
Moving to p3 because no activity for at least 24 weeks.
Priority: P1 → P3
Depends on: 1522925
Depends on: 1522930
Duplicate of this bug: 1623521

This also affects GeckoView. During GeckoView startup we spend 260ms in AddonManager startup (on a Moto G5). This code is on the critical path during the "App link" startup scenario - it delays the initial page load.

Profiles: https://perfht.ml/2QtHocL (0.4ms interval) / https://perfht.ml/2xSYRFj (5ms interval - less information, more realistic timings)

You need to log in before you can comment on or make changes to this bug.