And replace (aTab == this.selectedTab) with aTab.selected. .selectedTab getter seems more expensive than .mCurrentTab.
Created attachment 693717 [details] [diff] [review] patch
Comment on attachment 693717 [details] [diff] [review] patch The tab.selected changes are fine, but we should make selectedTab fast rather than using mCurrentTab.
So maybe selectedTab getter could return mCurrentTab directly, and use tabContainer.selectedItem instead when necessary?
This sounds reasonable.
Created attachment 694316 [details] [diff] [review] patch v2 I'm not sure whether there is some risk. I'm testing it in my profile.
Attachment #693717 - Attachment is obsolete: true
Created attachment 696460 [details] [diff] [review] patch v3 It just works.
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
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 20
You need to log in before you can comment on or make changes to this bug.