Closed Bug 1456262 Opened 2 years ago Closed 2 years ago

Optimize addAddonsToCrashReporter at startup

Categories

(Toolkit :: Add-ons Manager, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: kmag, Assigned: kmag)

References

(Blocks 1 open bug)

Details

(Keywords: perf, Whiteboard: [qf])

Attachments

(1 file)

addAddonsToCrashReporter consistently shows up in my profiles as taking about 6-10ms during startup.

Part of the problem is that it loads TelemetrySession.jsm, which we can't fix.

Part of the problem is that the escaping and string manipulation it does is fairly expensive. We can cache the escaped values in addonStartup.jsm to avoid that.

A lot of the problem is that we call it every time we load a bootstrap scope, even though we already set the correct value before we start loading any bootstrapped scopes, and it doesn't change after that. We can avoid this by skipping the redundant calls during startup.
Comment on attachment 8970357 [details]
Bug 1456262: Optimize addAddonsToCrashReporter at startup.

https://reviewboard.mozilla.org/r/239142/#review245148
Attachment #8970357 - Flags: review?(aswan) → review+
https://hg.mozilla.org/mozilla-central/rev/31dd07dd000e
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
Is manual testing required on this bug? If yes, please provide some STR and the proper extension(if required) or set the “qe-verify -“ flag.

Thanks!
Flags: needinfo?(kmaglione+bmo)
Flags: needinfo?(kmaglione+bmo) → qe-verify-
You need to log in before you can comment on or make changes to this bug.