Closed Bug 1356285 Opened 7 years ago Closed 7 years ago
micro-optimization in richlistbox selected
59 bytes, text/x-review-board-request
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!
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 firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/0ae37bdf2bbf micro-optimization in richlistbox selectedIndex setter. r=enndeakin+6102
You need to log in before you can comment on or make changes to this bug.