<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 5 Apr 2017, at 21:17, Jared Hirsch <<a href="mailto:6a68@mozilla.com" class="">6a68@mozilla.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><span class="m_226613154392545486m_-5628539400423713016gmail-"><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><br class="Apple-interchange-newline">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 class=""></blockquote><br class=""></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 class=""><br class=""></div><div class="">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?<span class="Apple-converted-space"> </span><a href="https://github.com/mozilla-services/screenshots/blob/master/addon/bootstrap.js#L61" class="">https://github.com/mozilla-ser<wbr class="">vices/screenshots/blob/master/<wbr class="">addon/bootstrap.js#L61</a><br class=""></div></div></div></div></div></blockquote><div><br class=""></div><div>Absolutely! These are cheap wins (as in: small change, big impact). I’d do the same thing for AddonManager.jsm (which is a pretty large module to read, parse & evaluate) and Console.jsm.</div><div>The only added JSM would be XPCOMUtils.jsm, but that one’s already required by many other modules, thus won’t add compartments/ overhead.</div><div><br class=""></div><div>Hope this helps,</div><div><br class=""></div><div>Mike.</div></div></body></html>