Status

enhancement
RESOLVED FIXED
a year ago
11 months ago

People

(Reporter: Oriol, Assigned: Oriol)

Tracking

unspecified
mozilla61
Bug Flags:
qe-verify -

Firefox Tracking Flags

(firefox61 fixed)

Details

Attachments

(1 attachment)

Assignee

Description

a year ago
browser.windows.get(windowId) is slow if there are lots of windows:

    for (let window of this.browserWindows(true)) {
      if (this.getId(window) === id) {
        return window;
      }
    }

https://searchfox.org/mozilla-central/rev/0e8eb01368600eb552dd558c83c64a3b6a0b89b8/toolkit/components/extensions/parent/ext-tabs-base.js#1392-1396

This should be optimized. This will also benefit browser.tabs.query({windowId}) via bug 1445316.
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)

Comment 3

a year ago
mozreview-review
Comment on attachment 8964184 [details]
Bug 1450572 - Optimize windows.get(windowId)

https://reviewboard.mozilla.org/r/232932/#review238882
Attachment #8964184 - Flags: review?(mixedpuppy) → review+
Assignee

Updated

a year ago
Keywords: checkin-needed

Comment 4

a year ago
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/57d58de5d58d
Optimize windows.get(windowId) r=mixedpuppy
Keywords: checkin-needed

Comment 5

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/57d58de5d58d
Status: ASSIGNED → RESOLVED
Last Resolved: a year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61

Comment 6

a year ago
Is manual testing required on this bug? If yes, please provide some STR and the proper extension(if required) or set the “qe-verify -“ flag.

Thanks!
Flags: needinfo?(oriol-bugzilla)
Assignee

Comment 7

a year ago
No difference in behavior, it's just that now the code does not iterate all windows in order to find the desired one. It's observable via performance.now() with lots of windows, but manual testing doesn't seem necessary.
Flags: needinfo?(oriol-bugzilla) → qe-verify-

Updated

11 months ago
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.