Closed Bug 1785967 Opened 2 years ago Closed 2 years ago

The first thing to create a mailnews URL triggers reading of the message database(s)

Categories

(MailNews Core :: Networking, defect, P2)

Tracking

(thunderbird_esr102 fixed)

RESOLVED FIXED
105 Branch
Tracking Status
thunderbird_esr102 --- fixed

People

(Reporter: darktrojan, Assigned: darktrojan)

References

(Blocks 1 open bug)

Details

(Keywords: perf, perf:startup, Whiteboard: [TM:102.3.0])

Attachments

(1 file)

I profiled application start-up on my main profile. More than half of the first two seconds is spent reading Mork databases.

Ultimately this is triggered by the Permission Manager loading permissions into memory. Each permission URL string is turned into an nsIURI and therefore an nsMsgMailNewsUrl for our protocols. The creation of an nsMsgMailNewsUrl (at least in the IMAP case) checks whether the message is available offline and therefore needs to read the .msf file.

I think delaying this one piece of information until needed will be enough to prevent the start-up performance issue.

Not only message db, but also mail accounts. This caused bug 1745033 comment 47.

I'm going to paper over this problem by initialising the permissions manager before telling the folder service that strings are ready, since if strings are not ready, this expensive code doesn't run.

I'd like to take the expensive code away from here and only run it when needed, but that seems like a complicated and potentially hazardous change, particularly given there's a one-line alternative.

Assignee: nobody → geoff
Status: NEW → ASSIGNED
Severity: -- → S3
Priority: -- → P2
Target Milestone: --- → 105 Branch

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/6e2506a48931
Initialise the permission manager before telling the folder service that strings are available. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED

Comment on attachment 9290835 [details]
Bug 1785967 - Initialise the permission manager before telling the folder service that strings are available. r=mkmelin,BenC

[Approval Request Comment]
Regression caused by (bug #): the ravages of time
User impact if declined: slower start-up than necessary
Testing completed (on c-c, etc.): in 105
Risk to taking this patch (and alternatives if risky): minimal

This should've had enough beta time by the time we release 102.3.0.

Attachment #9290835 - Flags: approval-comm-esr102?

I agree with waiting until 102.3.0

Whiteboard: [TM:102.3.0]

Comment on attachment 9290835 [details]
Bug 1785967 - Initialise the permission manager before telling the folder service that strings are available. r=mkmelin,BenC

[Triage Comment]
Approved for esr102

Attachment #9290835 - Flags: approval-comm-esr102? → approval-comm-esr102+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: