Closed Bug 1664700 Opened 5 years ago Closed 5 years ago

Delay loading parts of Enigmail until delayedStartup

Categories

(MailNews Core :: Security: OpenPGP, task)

Tracking

(thunderbird_esr78 wontfix)

RESOLVED FIXED
84 Branch
Tracking Status
thunderbird_esr78 --- wontfix

People

(Reporter: standard8, Assigned: standard8)

References

(Blocks 2 open bugs)

Details

(Keywords: perf)

Attachments

(1 file)

BondOpenPGP.jsm currently shows up on performance graphs as taking ~1.9s to load. That's isn't quite true, as it is running init() whilst the module is being loaded, and then spinning the event loop lots - the ChromeUtils.import is seeing the init() as still running, and is counting that.

In any case, the fact we're running init() whilst the module is being loaded may lead to unpredictability as to when it actually gets loaded - especially as we move to lazy loading modules.

Therefore I think it would be better for BondOpenPGP to be initialised later - I'm proposing in delayedStartup. This is triggered after the initial window has been painted but before the user gets to start doing things. I suspect we might be able to delay it further, but I don't really know how important this is to be initialised earlier. Thoughts welcome.

In this bug, I also want to move init routines for EnigmailVerify and EnigmailKeyRing - they both appear to be likely to be used in a session, so having an explicit point is probably good as well.

Blocks: 1660907
Depends on: 1664698
Blocks: 1664701
Keywords: perf
Status: NEW → ASSIGNED
Severity: -- → S3

Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/comm-central/rev/f97d0a2f0cc6
Delay some Enigmail modules until delayedStartup to avoid front-loading the startup process. r=kaie

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: