Closed Bug 1783501 Opened 2 years ago Closed 1 year ago

JSTreeSelection redraws/invalidates the whole tree when the selection changes

Categories

(Thunderbird :: General, defect)

defect

Tracking

(thunderbird_esr102 wontfix, thunderbird111 fixed)

RESOLVED FIXED
112 Branch
Tracking Status
thunderbird_esr102 --- wontfix
thunderbird111 --- fixed

People

(Reporter: standard8, Assigned: darktrojan)

References

(Blocks 1 open bug)

Details

(Keywords: perf, Whiteboard: [snnot3p])

Attachments

(3 files)

In looking at an address book issue, I set a debug point to check for something. At that stage I found that JSTreeSelection is invalidating the entire tree whenever the selection changes: https://searchfox.org/comm-central/rev/ea35bdf9e0ca322f988e976243d47d41ddaf6ba0/mailnews/base/src/JsTreeSelection.jsm#141-143

This means the entire tree is getting re-queried & rebuilt whenever the selection changes.

On my 2021 Mac, if I hold down the arrow key whilst on the address book contact list, I can see a flickering of the bottom elements as the selection changes.

I don't really see the need for invalidating the whole tree - at least not for most general cases, worst case, we should be able to invalidate the affected rows, if we can't simply move the selection.

Assignee: nobody → geoff
Status: NEW → ASSIGNED

Just a simple conversion to a class, and removal of aArgs. I haven't attempted to fix the incomplete JSDocs.

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/1fb588356c73
Convert JsTreeSelection.jsm to an ES Module. r=freaktechnik
https://hg.mozilla.org/comm-central/rev/660a937890b0
Stop TreeSelection calling invalidate unnecessarily. r=freaktechnik
https://hg.mozilla.org/comm-central/rev/8de41f03f1c3
Convert TreeSelection to a class. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 112 Branch
Attachment #9318068 - Flags: approval-comm-beta?
Attachment #9318069 - Flags: approval-comm-beta?
Attachment #9318282 - Flags: approval-comm-beta?

111.0b1 Build2 is happening tomorrow, Tuesday, but this hasn't yet been on nightly. So holding this until at least build 3, which is Thursday

Whiteboard: [snnot]
Regressions: 1817880

Comment on attachment 9318068 [details]
Bug 1783501 - Convert JsTreeSelection.jsm to an ES Module. r=#thunderbird-reviewers

[Triage Comment]
Approvd for beta

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

Comment on attachment 9318069 [details]
Bug 1783501 - Stop TreeSelection calling invalidate unnecessarily. r=#thunderbird-reviewers

[Triage Comment]
Approved for beta

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

Comment on attachment 9318282 [details]
Bug 1783501 - Convert TreeSelection to a class. r=#thunderbird-reviewers

[Triage Comment]
Approved for beta

Attachment #9318282 - Flags: approval-comm-beta? → approval-comm-beta+
Whiteboard: [snnot] → [snnot3p]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: