Closed Bug 1753180 Opened 3 years ago Closed 3 years ago

All contacts loaded into memory for telemetry count

Categories

(Thunderbird :: Address Book, enhancement)

enhancement

Tracking

(thunderbird_esr91 wontfix)

RESOLVED FIXED
98 Branch
Tracking Status
thunderbird_esr91 --- wontfix

People

(Reporter: darktrojan, Assigned: darktrojan)

References

Details

Attachments

(1 file)

At start-up, we count the number of contacts each type of address book directory has and record the value in telemetry. To do this we read every card from the SQLite database into memory, then count how many we have. The cards then remain in memory until Thunderbird closes.

A simple optimisation would be to just ask the database how many cards there are. That removes the need to read cards into memory unless we want to use them.

To do so I'm going to add a new attribute to nsIAbDirectory called childCardCount and implement it in the various directory types. SQLiteDirectory can provide a value by querying the database, the macOS and Outlook directories will still read every card and count them.

Target Milestone: --- → 98 Branch

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/6b5b28b39020
Add a childCardCount attribute to nsIAbDirectory to return a simple count. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Regressions: 1770448
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: