Closed Bug 1658062 Opened 4 years ago Closed 4 years ago

AddrBookDirectory.uuid is inefficent

Categories

(Thunderbird :: Address Book, defect, P1)

Unspecified
All

Tracking

(thunderbird_esr78+ fixed, thunderbird80 fixed)

RESOLVED FIXED
81 Branch
Tracking Status
thunderbird_esr78 + fixed
thunderbird80 --- fixed

People

(Reporter: standard8, Assigned: standard8)

References

Details

(Keywords: perf)

Attachments

(1 file)

I'm tracking an issue where Conversations does lots of quickSearchs for address books and takes a long time.

In the following profile, the quickSearch function takes about 1 second, however approximately a third of that (321ms) is taken up getting the UUID of the address book.

https://share.firefox.dev/3kotBBB

This is because the UUID is formulated using the dirName each time, which in turn is obtained from prefs, which also obtain a fresh pref branch each time.

None of these are necessary, and can easily be cached. Caching these should also help speed up accessing address books more generally as well.

I have a patch for these. I've checked it eliminates the extra calls on comm-central, though I can't easily check the full patch on my profile where I had the original issue.

Summary: AddrBookDirectory.uuid is very inefficent → AddrBookDirectory.uuid is inefficent

Geoff, I'd like to see this on beta soon. If Mark isn't available this week to drive it, in could you please do so? Thanks

Blocks: tb78found
Severity: -- → S3
Status: NEW → ASSIGNED
Flags: needinfo?(geoff)
OS: Unspecified → All
Priority: -- → P1
Version: unspecified → 78
Blocks: 1657565

matching severity of bug 1657565. ref bug 1657565 comment 15

Severity: S3 → S2
Flags: needinfo?(geoff)

Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/comm-central/rev/8bb60d09ef96
Cache various values in AddrBookDirectory to avoid expensive rebuilds all the time. r=darktrojan

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch

Comment on attachment 9168936 [details]
Bug 1658062 - Cache various values in AddrBookDirectory to avoid expensive rebuilds all the time. r?darktrojan!

[Approval Request Comment]
Regression caused by (bug #): Address book changes.
User impact if declined: Performance impact.
Testing completed (on c-c, etc.): Landed on c-c.
Risk to taking this patch (and alternatives if risky): Should be low - caches various variables in the address book to avoid re-loading them all the time.

Attachment #9168936 - Flags: approval-comm-esr78?
Attachment #9168936 - Flags: approval-comm-beta?

Comment on attachment 9168936 [details]
Bug 1658062 - Cache various values in AddrBookDirectory to avoid expensive rebuilds all the time. r?darktrojan!

[Triage Comment]
Approved for beta

Attachment #9168936 - Flags: approval-comm-beta? → approval-comm-beta+

Comment on attachment 9168936 [details]
Bug 1658062 - Cache various values in AddrBookDirectory to avoid expensive rebuilds all the time. r?darktrojan!

[Triage Comment]
Approved for esr78
This helped me with bug 1657565.

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

Attachment

General

Created:
Updated:
Size: