Closed Bug 1933104 Opened 1 year ago Closed 1 year ago

Message list tree can waste a significant amount of time creating rows that are never seen

Categories

(Thunderbird :: Folder and Message Lists, defect)

Thunderbird 115
defect

Tracking

(thunderbird_esr128 fixed, thunderbird134 fixed)

RESOLVED FIXED
135 Branch
Tracking Status
thunderbird_esr128 --- fixed
thunderbird134 --- fixed

People

(Reporter: darktrojan, Assigned: darktrojan)

References

Details

(Keywords: perf)

Attachments

(1 file)

If a new message is added to the top of the message list, all of the visible and just-off-screen rows are redrawn to reflect the message now in those positions (as the messages are now all one row lower). If lots of new messages are added to the top of the message list individually, all of the visible and just-off-screen rows are redrawn for every single added message. This is a huge waste of processing time, especially as the redrawing isn't exactly fast.

I think what we should do is have the rows update at most once per frame, which is still a lot more frequently than humans can see, but dramatically reduces the work done. If the data for any particular row is updated more than once during that time, only the most recent data will be used. The downside is that the rows won't be updated instantly and that will annoy tests (and test writers). It's a price worth paying, I think.

Sounds like this might be one of the severe issues affecting 115 and 128 users getting new messages?

Flags: needinfo?(geoff)

Maybe? 🤷‍♂️

The one circumstance I describe on Phabricator with this patch, certainly. But that does involve a lot of messages appearing all at once, which I wouldn't expect many people to see regularly.

Flags: needinfo?(geoff)
Target Milestone: --- → 135 Branch

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/b0dd186860dd
Update tree-view rows at most once per frame. r=aleca,mkmelin

Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Regressions: 1933699

Geoff, is this ready for beta uplift?

Flags: needinfo?(geoff)

Comment on attachment 9439610 [details]
Bug 1933104 - Update tree-view rows at most once per frame. r=#thunderbird-reviewers

[Approval Request Comment]
Regression caused by (bug #): supernova
User impact if declined: message list could slow everything down if many updates happened at once
Testing completed (on c-c, etc.): a week on central
Risk to taking this patch (and alternatives if risky): has the potential to make a big mess, but I think the risk is low

Flags: needinfo?(geoff)
Attachment #9439610 - Flags: approval-comm-beta?

Comment on attachment 9439610 [details]
Bug 1933104 - Update tree-view rows at most once per frame. r=#thunderbird-reviewers

[Triage Comment]
Approved for beta

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

Comment on attachment 9439610 [details]
Bug 1933104 - Update tree-view rows at most once per frame. r=#thunderbird-reviewers

[Approval Request Comment]
Regression caused by (bug #): supernova
User impact if declined: message list could slow everything down if many updates happened at once
Testing completed (on c-c, etc.): a week on central and a week on beta – this shouldn't be on ESR before 128.6 so that'll give it a full month on beta
Risk to taking this patch (and alternatives if risky): has the potential to make a big mess, but I think the risk is low

Attachment #9439610 - Flags: approval-comm-esr128?

Comment on attachment 9439610 [details]
Bug 1933104 - Update tree-view rows at most once per frame. r=#thunderbird-reviewers

[Triage Comment]
Approved for esr128

Attachment #9439610 - Flags: approval-comm-esr128? → approval-comm-esr128+
Blocks: 1930619
Version: unspecified → Thunderbird 115
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: