Closed Bug 1587259 Opened 4 months ago Closed 4 months ago

Improve JS address book performance

Categories

(MailNews Core :: Address Book, enhancement)

enhancement
Not set

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 71.0

People

(Reporter: darktrojan, Assigned: darktrojan)

References

(Depends on 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

Rather than re-opening bug 1581765 to address the poor performance, I'll do it in this new bug.

Attached patch 1587259-jsaddrbook-perf-1.diff (obsolete) — Splinter Review

This does all of the migration database writing in one go. This required turning some of the start-up functions to async functions, but I don't see any problem doing that.

I've also added two indices to the database to improve performance of the UI on large address books.

Attachment #9099758 - Flags: review?(mkmelin+mozilla)
Comment on attachment 9099758 [details] [diff] [review]
1587259-jsaddrbook-perf-1.diff

Windows doesn't like this one either.
Attachment #9099758 - Flags: review?(mkmelin+mozilla)
Attachment #9099758 - Attachment is obsolete: true
Attachment #9099785 - Flags: review?(mkmelin+mozilla)
Duplicate of this bug: 1587175
Comment on attachment 9099785 [details] [diff] [review]
1587259-jsaddrbook-perf-2.diff

Review of attachment 9099785 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good, r=mkmelin
Attachment #9099785 - Flags: review?(mkmelin+mozilla) → review+
Comment on attachment 9099785 [details] [diff] [review]
1587259-jsaddrbook-perf-2.diff

Review of attachment 9099785 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks, this makes the conversion much more bearable (like 1 minute for 16000 contacts) but the opening of that AB is quite fast, in seconds.
The indexes seem to double the size of the sqlite file. So when the conversion was from 6MB to 12MB, now it is 24MB (quite OK for the benefit of getting a format that can be read also outside of TB with sqlite tools).

There are still the "uncaught exceptions" remaining which make using the AB window choppy.
Attachment #9099785 - Flags: feedback+

What about AB files that are already converted without those indexes? How do we fix those?

Keywords: checkin-needed

Those files will automatically be upgraded from schema version 1 to 2 when first used.

Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/0e8585d9cfce
Improve JS address book performance. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 71.0
Depends on: 1597394
You need to log in before you can comment on or make changes to this bug.