<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote"><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_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><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> <br></div><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_226613154392545486m_-5628539400423713016gmail-"><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
The other possible regression that Screenshots could introduce is that it<br>
adds a content script to all <a href="http://screenshots.firefox.com" rel="noreferrer" target="_blank">screenshots.firefox.com</a> pages.  The content<br>
script itself isn't a concern IMHO (it's just part of the performance of<br>
screenshot pages) but as a result it does activate the the WebExtension<br>
matching code that decides whether to add the content script to a given<br>
page.<br>
</blockquote>
<br></span>
You're right that that introduces a small amount of additional overhead, but at this point it's pretty reasonable. I'm planning to rewrite most of that matching code in C++ soon, at which point the overhead probably won't be measurable.<div class="m_226613154392545486m_-5628539400423713016gmail-HOEnZb"><div class="m_226613154392545486m_-5628539400423713016gmail-h5"><br>
______________________________<wbr>_________________<br>
firefox-dev mailing list<br>
<a href="mailto:firefox-dev@mozilla.org" target="_blank">firefox-dev@mozilla.org</a><br>
<a href="https://mail.mozilla.org/listinfo/firefox-dev" rel="noreferrer" target="_blank">https://mail.mozilla.org/listi<wbr>nfo/firefox-dev</a><br>
</div></div></blockquote></div><br></div></div>