Improve gBrowser.selectedTab getter efficiency

RESOLVED FIXED in Firefox 20

Status

()

defect
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: tabutils+bugzilla, Assigned: tabutils+bugzilla)

Tracking

({perf})

Trunk
Firefox 20
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

And replace (aTab == this.selectedTab) with aTab.selected. .selectedTab getter seems more expensive than .mCurrentTab.
Posted patch patch (obsolete) — Splinter Review
Attachment #693717 - Flags: feedback?(dao)
Comment on attachment 693717 [details] [diff] [review]
patch

The tab.selected changes are fine, but we should make selectedTab fast rather than using mCurrentTab.
Attachment #693717 - Flags: feedback?(dao)
Status: UNCONFIRMED → NEW
Ever confirmed: true
So maybe selectedTab getter could return mCurrentTab directly, and use tabContainer.selectedItem instead when necessary?
This sounds reasonable.
Posted patch patch v2 (obsolete) — Splinter Review
I'm not sure whether there is some risk. I'm testing it in my profile.
Attachment #693717 - Attachment is obsolete: true
Posted patch patch v3Splinter Review
It just works.
Attachment #694316 - Attachment is obsolete: true
Attachment #696460 - Flags: review?(dao)
Attachment #696460 - Flags: review?(dao) → review+
Assignee: nobody → ithinc
Keywords: checkin-needed, perf
OS: Windows 7 → All
Hardware: x86_64 → All
Summary: Replace .selectedTab with .mCurrentTab in tabbrowser.xml when possible → Improve gBrowser.selectedTab getter efficiency
https://hg.mozilla.org/mozilla-central/rev/0b34087f3e7d
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 20
Duplicate of this bug: 817373
You need to log in before you can comment on or make changes to this bug.