<div dir="ltr"><div>Talked this over with Kris and Dave in IRC just now. I'm going to change bootstrap.js to:<br>(1) lazy load all the Cu.imports;<br>(2) delay WebExtension startup until the "<span class="gmail-message"><span class="gmail-content">sessionstore-windows-restored" event.<br><br></span></span></div><span class="gmail-message"><span class="gmail-content">Hopefully this will address the startup performance regression.<br></span></span></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 5, 2017 at 1:02 PM, Kris Maglione <span dir="ltr"><<a href="mailto:kmaglione@mozilla.com" target="_blank">kmaglione@mozilla.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Wed, Apr 05, 2017 at 12:57:39PM -0700, Dave Townsend wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
AddonManager is already loaded by this point so importing it should cost<br>
nothing. I expect we load Console.jsm elsewhere during startup already too.<br>
</blockquote>
<br></span>
Note that calling Cu.import isn't free, even if the module is already loaded. defineLazyModule getter isn't free easier, but it's much cheaper than calling into XPConnect.<br>
</blockquote></div><br></div>