Closed Bug 1354564 Opened 8 years ago Closed 8 years ago

Only update commands once per tab switch

Categories

(Core :: XUL, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: enndeakin, Assigned: enndeakin)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

Attached file Possible patch (obsolete) —
When switching tabs and doing other tasks, commands can be updated several times due to focus shifting around. However, we could instead queue up requests to update commands until the tab switch is finished, preventing unnecessary work. On my machine this appeared to save about 1ms per tab switch although I only tested my hand.
See Also: → 1356587
The included test shows that command updates are reduced from 4 to 1 during a tab switch.
Assignee: nobody → enndeakin
Attachment #8855813 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #8861909 - Flags: review?(mconley)
Comment on attachment 8861909 [details] [diff] [review] Reduce updates during tab switch Review of attachment 8861909 [details] [diff] [review]: ----------------------------------------------------------------- I like it! Thanks! ::: browser/base/content/test/tabs/browser_tabswitch_updatecommands.js @@ +1,1 @@ > +add_task(function* () { Can you please add "use strict" at the top, and a short header comment describing what the test is testing?
Attachment #8861909 - Flags: review?(mconley) → review+
Pushed by neil@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/1cd959bc881b add a queue-up mechanism to command dispatchers that lets updates be queued up so that duplicates can be removed. Use this for tab switching to reduce the number of extraneous command updates that occur, r=mconley
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Depends on: 1361484
Depends on: 1404999
Depends on: 1395619
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: