Closed Bug 1356285 Opened 3 years ago Closed 3 years ago

micro-optimization in richlistbox selectedIndex setter

Categories

(Toolkit :: XUL Widgets, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
mozilla55
Iteration:
55.4 - May 1
Tracking Status
firefox55 --- fixed

People

(Reporter: mak, Assigned: mak)

References

(Blocks 1 open bug)

Details

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

Attachments

(1 file)

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?
Attachment #8858105 - Flags: review?(enndeakin)
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+
Pushed by mak77@bonardo.net:
https://hg.mozilla.org/integration/autoland/rev/0ae37bdf2bbf
micro-optimization in richlistbox selectedIndex setter. r=enndeakin+6102
https://hg.mozilla.org/mozilla-central/rev/0ae37bdf2bbf
Status: ASSIGNED → RESOLVED
Closed: 3 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.