Cards view reads all of the tag preferences once for every card
Categories
(Thunderbird :: Folder and Message Lists, defect)
Tracking
(thunderbird_esr128+ fixed, thunderbird131 fixed)
People
(Reporter: darktrojan, Assigned: darktrojan)
References
Details
(Keywords: perf:responsiveness)
Attachments
(2 files, 1 external file)
MailServices.tags.getAllTags() becomes a very expensive operation when it gets called many times. There must be a better way than to call it every time we create a card.
Updated•2 years ago
|
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Comment 1•2 years ago
|
||
| Assignee | ||
Comment 2•2 years ago
|
||
A small improvement. :-)
| Assignee | ||
Updated•2 years ago
|
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/4dbe6597743b
Improve performance of tags display in cards view. r=aleca
Comment 5•2 years ago
|
||
Geoff, We're going to pick this up for beta. Please let us know if you have any concerns with shipping this.
Comment 6•2 years ago
|
||
Comment on attachment 9424550 [details]
Bug 1917993 - Improve performance of tags display in cards view. r=#thunderbird-reviewers
[Triage Comment]
Approved for beta
Comment 7•2 years ago
|
||
| bugherder uplift | ||
Thunderbird 131.0b6:
https://hg.mozilla.org/releases/comm-beta/rev/b6f0b9dbd432
Updated•2 years ago
|
Comment 8•2 years ago
|
||
That's some impressive jank.
Geoff, how many tags were used in causing that, or at what number would users be affected?
| Assignee | ||
Comment 9•2 years ago
|
||
I think that was a new profile, so just the default 5 tags. It would affect everybody, but only in a situation like this (loading message headers in a folder for the first time) where the message list rows are being updated thousands of times, which is its own special kind of bad performance.
Comment 10•2 years ago
|
||
So examples would be on startup and switching folders?
Is it hitting for every message in the folder, or only those in view at the time?
| Assignee | ||
Comment 11•2 years ago
|
||
(In reply to Wayne Mery (:wsmwk) from comment #10)
So examples would be on startup and switching folders?
No, just when message headers are first downloaded from a server. So when an account has just been added, or I suppose if you happen to be looking at a folder that gets a lot of new mail all at once (e.g. my bugmail folder after a week away).
When a message arrives a new card is put at the top of the list, and all the cards below it are updated (1 hit each to getAllTags before this patch). Repeat for every new message. Yes, this is absurd. Fixing it is hard.
In most normal use though, nobody would notice the bad performance.
Is it hitting for every message in the folder, or only those in view at the time?
It's once for every card that is created or refreshed. So yes, only the messages in view and just out-of-view, but in the bad case that's the whole visible list × every new message.
| Assignee | ||
Comment 13•2 years ago
|
||
Comment on attachment 9424550 [details]
Bug 1917993 - Improve performance of tags display in cards view. r=#thunderbird-reviewers
[Approval Request Comment]
Regression caused by (bug #): new cards view
User impact if declined: performance when loading lots of cards at once
Testing completed (on c-c, etc.): in 131 b6
Risk to taking this patch (and alternatives if risky): a little, I'd like this to have more time on beta but if the next ESR is on schedule in 10 days that should be enough
Comment 14•2 years ago
|
||
Comment on attachment 9424550 [details]
Bug 1917993 - Improve performance of tags display in cards view. r=#thunderbird-reviewers
[Triage Comment]
Approved for esr128
Comment 15•2 years ago
|
||
| bugherder uplift | ||
Thunderbird 128.3.2esr:
https://hg.mozilla.org/releases/comm-esr128/rev/baf75efc4852
Description
•