It's a bit tricky to lazify this. The main code interacting with it is in
PanelUI.js, but there are various other bits of code that rely on it or parts of it throughout
browser/. Particularly the fact that it contains
panelview nodes that may be needed for other buttons that show panels (like the developer tools button and the library button) might make this tricky.
On the other hand, given the size of what it contains, this is probably the biggest-bang-for-our-buck part of bug 1624683.
Perhaps we can wrap it all in a template, use the
PanelUI.popup accessor to de-lazify it, update the code in PanelUI.js to not need direct access to it until it's delazified, and add a test that this doesn't happen in a new window by the time the idle tasks for the new window have run, and then systematically eliminate/lazify accesses that require the accessor.