micro-optimization in richlistbox selectedIndex setter

RESOLVED FIXED in Firefox 55

Status

()

enhancement
P1
normal
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: mak, Assigned: mak)

Tracking

(Blocks 1 bug)

Trunk
mozilla55
Points:
---
Dependency tree / graph
Bug Flags:
qe-verify -

Firefox Tracking Flags

(firefox55 fixed)

Details

(Whiteboard: [fxsearch][photon-performance])

Attachments

(1 attachment)

Assignee

Description

2 years ago
Setting selectedIndex invokes selectItem, that sets currentItem and then invokes _fireOnSelect.
The richlistbox version of _fireOnSelect queries .currentIndex, that does getIndexOfItem(this.currentItem) that has to iterate all the children.

Since we just set the index, we already know it!
Flags: qe-verify?
Assignee

Updated

2 years ago
Attachment #8858105 - Flags: review?(enndeakin)

Comment 2

2 years ago
mozreview-review
Comment on attachment 8858105 [details]
Bug 1356285 - micro-optimization in richlistbox selectedIndex setter.

https://reviewboard.mozilla.org/r/130072/#review133456
Attachment #8858105 - Flags: review?(enndeakin) → review+

Comment 3

2 years ago
Pushed by mak77@bonardo.net:
https://hg.mozilla.org/integration/autoland/rev/0ae37bdf2bbf
micro-optimization in richlistbox selectedIndex setter. r=enndeakin+6102

Comment 4

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/0ae37bdf2bbf
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Iteration: --- → 55.4 - May 1
Flags: qe-verify? → qe-verify-
You need to log in before you can comment on or make changes to this bug.