<div dir="ltr">On Wed, Apr 5, 2017 at 12:17 PM, Jared Hirsch <span dir="ltr"><<a href="mailto:6a68@mozilla.com" target="_blank">6a68@mozilla.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote"><span class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="m_-5430444256113301771m_226613154392545486m_-5628539400423713016gmail-"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
We have an explicit call to webExtension.startup() in our bootstrap.js – would the performance hit be when the startup method is called, or before then (e.g., when the webExtension object is created)?  Just curious if we could accomplish anything by deferring the startup.<br>
</blockquote>
<br></span>
There should be no significant performance hit until after startup() is called. Hm. Or, at least, there wouldn't if LegacyExtensionUtils didn't eagerly import a couple of other WebExtension modules. We should be able to fix that in an upliftable way, though. XPIProvider really doesn't need to load that module until the startup() method is called.</blockquote><div><br></div></span><div>Ah, but note that our bootstrap.js directly Cu.import()s LegacyExtensionUtils. Would it help to lazily import that module instead? LegacyExtensionUtils isn't called inside bootstrap until after startup(), so, maybe? <a href="https://github.com/mozilla-services/screenshots/blob/master/addon/bootstrap.js#L61" target="_blank">https://github.com/mozilla-ser<wbr>vices/screenshots/blob/master/<wbr>addon/bootstrap.js#L61</a><br></div></div></div></div></blockquote><div><br></div><div>Sounds like we should go ahead and defer the startup of the webextension in bootstrap.js and that should take care of any performance problems during startup.</div><div><br></div><div>Are there any other performance concerns we should be investigating more?<br></div></div><br></div></div>