Closed Bug 1439313 Opened 3 years ago Closed 3 years ago

Delay loading Places treeview.js until necessary

Categories

(Firefox :: Bookmarks & History, enhancement, P2)

55 Branch
enhancement

Tracking

()

RESOLVED FIXED
Firefox 60
Tracking Status
firefox60 --- fixed

People

(Reporter: mak, Assigned: mak)

References

Details

(Keywords: perf, Whiteboard: [fxsearch])

Attachments

(1 file)

I suspect we can lazy load this when PlacesTreeView is requested
Keywords: perf
Summary: defineLazyScriptGetter treeview.js → Delay loading Places treeview.js until necessary
Comment on attachment 8952192 [details]
Bug 1439313 - delay loading Places treeview.js until necessary.

https://reviewboard.mozilla.org/r/221438/#review227232

Looks good from reading the patch, but the tests don't look happy.

Also, is there a reason why treeView.js imports XPCOMUtils.jsm and Services.jsm if it's loaded in the browser.xul scope?
Attachment #8952192 - Flags: review?(florian)
Failures are like "test left unexpected property on window", it's mochitest-browser protection against leaking properties on windows between tests, in reality this is a false alarm since these properties were there before too, just that now the test may cause them to be added. I'll think how to avoid that, I wouldn't want to add to the properties whitelist.

btw, treeview.js is not just loaded in browser.xul, places trees are also in other dialogs that don't include browser (the select bookmark dialog from preferences for example).
Comment on attachment 8952192 [details]
Bug 1439313 - delay loading Places treeview.js until necessary.

https://reviewboard.mozilla.org/r/221438/#review227376

Thanks!
Attachment #8952192 - Flags: review?(florian) → review+
Pushed by mak77@bonardo.net:
https://hg.mozilla.org/integration/autoland/rev/041b0a0ece72
delay loading Places treeview.js until necessary. r=florian
https://hg.mozilla.org/mozilla-central/rev/041b0a0ece72
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 60
You need to log in before you can comment on or make changes to this bug.