<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 3, 2017 at 12:32 PM, Ehsan Akhgari <span dir="ltr"><<a href="mailto:ehsan.akhgari@gmail.com" target="_blank">ehsan.akhgari@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="m_8109201026088359661gmail-m_4516431807300526120m_-5126042985034769161gmail-m_7101967417692840746gmail-">On Mon, Apr 3, 2017 at 1:20 PM, Cory Price <span dir="ltr"><<a href="mailto:cprice@mozilla.com" target="_blank">cprice@mozilla.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div>Hi Ehsan,<br><br></div>Thanks for your questions! We've put some answers together below (although Ian may have more to add here when he returns Wednesday).<span class="m_8109201026088359661gmail-m_4516431807300526120m_-5126042985034769161gmail-m_7101967417692840746gmail-m_5221298026335215695gmail-"><br><br>> Are there some profile links showing what the impact of the extension to the browser's idle time looks like? Does the extension need to run code in the background, either lazily or periodically for certain tasks?<br><br></span>No code runs in the background.<span class="m_8109201026088359661gmail-m_4516431807300526120m_-5126042985034769161gmail-m_7101967417692840746gmail-m_5221298026335215695gmail-"><br></span></div></div></blockquote><div><br></div></span><div>Great!<br><br></div><div>Does the add-on inject a frame script into every page? Or only into the pages that the user wants to take a screenshot from?<br></div></div></div></div></blockquote><div><br></div><div>Not on every page, so the latter. Ref: <a href="https://github.com/mozilla-services/screenshots/issues/2554#issuecomment-291263613" target="_blank">https://github.com/mozilla-ser<wbr>vices/screenshots/issues/2554#<wbr>issuecomment-291263613</a><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div></div><span class="m_8109201026088359661gmail-m_4516431807300526120m_-5126042985034769161gmail-m_7101967417692840746gmail-"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><span class="m_8109201026088359661gmail-m_4516431807300526120m_-5126042985034769161gmail-m_7101967417692840746gmail-m_5221298026335215695gmail-">> Are there some profile links showing the performance of the extension as the screenshot feature itself is being used?<br><br></span>This performance hasn't been graphed. We should minimize any slowdown here, but also recognize that it would be from the direct action of a user and so could be expected. Thanks for the perf-html information. We've created an issue to create one of these profiles (<a href="https://github.com/mozilla-services/screenshots/issues/2554" target="_blank">https://github.com/mozilla-se<wbr>rvices/screenshots/issues/2554</a><wbr>), would you have any resources to help us get going here? And/or is there more documentation aside from your response in this thread?<br></div></div></blockquote><div><br></div></span><div>What kind of resources did you have in mind? I personally have very limited time these days and a ton of things to investigate, but I looked a bit at the code and found a few things that are probably worth paying more attention to, which I commented on in the issue above. </div></div></div></div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Someone needs to poke into this using a profiler to discover more. :-) </div></div></div></div></blockquote><div><br>Thanks for commenting! A resource to "poke at this using a profiler to
discover more" as noted below would be great to have. Our backlog is full, so identifying anything severe should happen soon (this week?), and someone familiar with the tools and severity of items would be extremely helpful.<br></div><div><br>If there's documentation on the "performance review" process and ownership I'd love to subscribe so I'm not behind on the next thing.<br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>But thankfully it seems that the add-on code base is relatively small so it should be fairly simple for someone familiar with the code to come up with an effective approach of examining all of the use cases where the add-on can be expected to run code, run them under the profiler and see what comes out of it. The profiler UI makes it very easy to search for things, so for example you can easily search for the names of the functions used in the add-on code to see where they show up in the profile and how much time they spend, etc.<br><br></div><div>If you needed help reading profiles, I'd be happy to take a look if you post some links here.<br></div></div></div></div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div></div><span class="m_8109201026088359661gmail-m_4516431807300526120m_-5126042985034769161gmail-m_7101967417692840746gmail-"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra">We've also created an issue to record how long it takes to process an image (<a href="https://github.com/mozilla-services/screenshots/issues/2555" target="_blank">https://github.com/mozilla-se<wbr>rvices/screenshots/issues/2555</a><wbr>).<span class="m_8109201026088359661gmail-m_4516431807300526120m_-5126042985034769161gmail-m_7101967417692840746gmail-m_5221298026335215695gmail-"><br><br>> Does the extension need to do I/O? How does it achieve that? If it uses sqlite, has there been an analysis on the sqlite query performance? If it uses other types of storage, has there been analysis on the performance of other such mechanisms?<br><br></span>We don't use sqlite, we do use `browser.storage.local` for a small amount of account data.<span class="m_8109201026088359661gmail-m_4516431807300526120m_-5126042985034769161gmail-m_7101967417692840746gmail-m_5221298026335215695gmail-"><br><br>> Does the extension need to do expensive image manipulation on the main thread?<br><br></span>No.<span class="m_8109201026088359661gmail-m_4516431807300526120m_-5126042985034769161gmail-m_7101967417692840746gmail-m_5221298026335215695gmail-"><br><br>> Are there any other details which would be interesting to know from a performance perspective?<br><br></span>This is a relatively simple extension that is not in the primary UI flow. It doesn't do anything until the user specifically engages with it.</div></div></blockquote><div><br><br></div></span><div>These all sound good!<br><br></div><div>Thanks again,<br></div><div>Ehsan<br></div><span class="m_8109201026088359661gmail-m_4516431807300526120m_-5126042985034769161gmail-m_7101967417692840746gmail-"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div><div class="m_8109201026088359661gmail-m_4516431807300526120m_-5126042985034769161gmail-m_7101967417692840746gmail-m_5221298026335215695gmail-h5"><br><br><div class="gmail_quote">On Mon, Apr 3, 2017 at 9:47 AM, Ehsan Akhgari <span dir="ltr"><<a href="mailto:ehsan.akhgari@gmail.com" target="_blank">ehsan.akhgari@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>On Mon, Apr 3, 2017 at 12:19 PM, Dave Townsend <span dir="ltr"><<a href="mailto:dtownsend@mozilla.com" target="_blank">dtownsend@mozilla.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><span class="m_8109201026088359661gmail-m_4516431807300526120m_-5126042985034769161gmail-m_7101967417692840746gmail-m_5221298026335215695gmail-m_8264583408077799536gmail-m_-3203278515896907778m_-5653626412358582230gmail-m_-4601462701646954958gmail-m_-6584844339162694941m_2883241953964899436gmail-">On Mon, Apr 3, 2017 at 9:16 AM, Ehsan Akhgari <span dir="ltr"><<a href="mailto:ehsan.akhgari@gmail.com" target="_blank">ehsan.akhgari@gmail.com</a>></span> wrote:<br></span><div class="gmail_extra"><div class="gmail_quote"><span class="m_8109201026088359661gmail-m_4516431807300526120m_-5126042985034769161gmail-m_7101967417692840746gmail-m_5221298026335215695gmail-m_8264583408077799536gmail-m_-3203278515896907778m_-5653626412358582230gmail-m_-4601462701646954958gmail-m_-6584844339162694941m_2883241953964899436gmail-"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br><div dir="ltr"><span><div class="gmail_extra"><div class="gmail_quote">On Mon, Apr 3, 2017 at 12:11 PM, Mark Banner <span dir="ltr"><<a href="mailto:mbanner@mozilla.com" target="_blank">mbanner@mozilla.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF"><span>
On 03/04/2017 16:45, Ehsan Akhgari wrote:<br>
<blockquote type="cite">
<div dir="ltr">
<ul>
<li>Are there some profile links showing what the
startup/shutdown of the browser looks like with this
extension installed?</li>
</ul>
</div>
</blockquote></span>
I'll let Ian answer most of this. What I can say that has definitely
been done are Talos runs which showed no regressions.<br>
<br>
<a class="m_8109201026088359661gmail-m_4516431807300526120m_-5126042985034769161gmail-m_7101967417692840746gmail-m_5221298026335215695gmail-m_8264583408077799536gmail-m_-3203278515896907778m_-5653626412358582230gmail-m_-4601462701646954958gmail-m_-6584844339162694941m_2883241953964899436gmail-m_757071412928977815m_-220310353351875942m_2965181148551821944moz-txt-link-freetext" href="https://github.com/mozilla-services/screenshots/issues/2317" target="_blank">https://github.com/mozilla-ser<wbr>vices/screenshots/issues/2317</a><span class="m_8109201026088359661gmail-m_4516431807300526120m_-5126042985034769161gmail-m_7101967417692840746gmail-m_5221298026335215695gmail-m_8264583408077799536gmail-m_-3203278515896907778m_-5653626412358582230gmail-m_-4601462701646954958gmail-m_-6584844339162694941m_2883241953964899436gmail-m_757071412928977815m_-220310353351875942HOEnZb"></span><br></div>
</blockquote></div><br></div></span><div class="gmail_extra">Talos should be thought of more as a smoke detector for this kind of feature. That it has not shown any regressions should be a sign that the building isn't on fire, not necessarily that the feature is ready to be shipped. :-)<br clear="all"></div><div class="gmail_extra"><br></div><div class="gmail_extra">Unfortunately at this time we have no automated tools that can analyze the impact of a few front-end feature without a lot of manual performance investigation.<br></div></div></blockquote><div><br></div></span><div>Do we have good documentation on how to do the manual performance investigation</div></div></div></div></blockquote><div><br></div></span><div>The basics are pretty simple: go to <a href="https://perf-html.io" target="_blank">https://perf-html.io</a>, install the profiler add-on and start profiling using the instructions on that page! We don't unfortunately have a lot of great documentation at this point due to the lack of bandwidth to produce it. Sorry about that. We're trying our best to move fast on all fronts here but we're really starved for choosing what to work on. :-(<br><br></div><div>Last Friday at the Quantum Flow work week here in Toronto, I gave an informal talk about how to use the Gecko Profiler since people were interested in seeing how I use it. I didn't have any slides or any specific profiling scenario prepared so I decided to profile Firefox live and delve into a couple of scenarios in the parent and content processes. The presentation is being uploaded right now and will be available at this link once finished: <<a href="https://air.mozilla.org/gecko-profiler-introduction/" target="_blank">https://air.mozilla.org/gecko<wbr>-profiler-introduction/</a>>. I hope this will be a good starting point. If people have questions about how to use the profiler and how to read the profiles, I and others hanging out in #flow would be happy to help answer questions!<br></div><span><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div> and a plan for adding the automated testing we need to avoid it? <br></div></div></div></div>
</blockquote></span></div><br></div><div class="gmail_extra">Automated testing for this is easier said than done... :/ In general building a tool that can analyze an arbitrary feature without knowing anything about it in advance is a research problem. The reason tools like Talos aren't a suitable measurement utility here is that they have no tests that would directly measure anything that this feature would directly impact, and most of their tests are probably too noisy for any potential impact that the feature _could_ be introducing to show up in any significant way in the test output numbers. This excludes tests like Ts, in theory, but in practice even those tests have been less helpful in preventing startup regressions than I would really like... Why that is the case, I'm not really sure. It could be due to issues in Talos, or in how we use it, or both. Again, using Ts as an example, we have gotten more than twice as bad over the past year on this Ts Windows 32-bit e10s PGO measurement <<a href="https://treeherder.mozilla.org/perf.html#/graphs?timerange=31536000&series=%5Bmozilla-central,e394aab72917d169024558cbab33eb4e7e9504e1,1,1%5D" target="_blank">https://treeherder.mozilla.or<wbr>g/perf.html#/graphs?timerange=<wbr>31536000&series=%5Bmozilla-cen<wbr>tral,e394aab72917d169024558cba<wbr>b33eb4e7e9504e1,1,1%5D</a>>, so perhaps there is just a death by a thousand cuts effect at play here.<br><br></div><div class="gmail_extra">But for the time being, I think we shouldn't bet the farm on just running tests on Talos, especially for features that don't even get the regular Talos testing that normal features developed on m-c get.<span class="m_8109201026088359661gmail-m_4516431807300526120m_-5126042985034769161gmail-m_7101967417692840746gmail-m_5221298026335215695gmail-m_8264583408077799536gmail-m_-3203278515896907778m_-5653626412358582230gmail-m_-4601462701646954958gmail-m_-6584844339162694941HOEnZb"><font color="#888888"><br clear="all"></font></span></div><span class="m_8109201026088359661gmail-m_4516431807300526120m_-5126042985034769161gmail-m_7101967417692840746gmail-m_5221298026335215695gmail-m_8264583408077799536gmail-m_-3203278515896907778m_-5653626412358582230gmail-m_-4601462701646954958gmail-m_-6584844339162694941HOEnZb"><font color="#888888"><div class="gmail_extra"><br>-- <br><div class="m_8109201026088359661gmail-m_4516431807300526120m_-5126042985034769161gmail-m_7101967417692840746gmail-m_5221298026335215695gmail-m_8264583408077799536gmail-m_-3203278515896907778m_-5653626412358582230gmail-m_-4601462701646954958gmail-m_-6584844339162694941m_2883241953964899436gmail_signature"><div dir="ltr">Ehsan<br></div></div>
</div></font></span></div>
</blockquote></div><br><br clear="all"><br></div></div><span class="m_8109201026088359661gmail-m_4516431807300526120m_-5126042985034769161gmail-m_7101967417692840746gmail-m_5221298026335215695gmail-HOEnZb"><font color="#888888">-- <br><div class="m_8109201026088359661gmail-m_4516431807300526120m_-5126042985034769161gmail-m_7101967417692840746gmail-m_5221298026335215695gmail-m_8264583408077799536gmail-m_-3203278515896907778m_-5653626412358582230gmail-m_-4601462701646954958gmail-m_-6584844339162694941gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Cory Price<br></div>/ckprice<br></div></div></div></div>
</font></span></div></div>
</blockquote></span></div><span class="m_8109201026088359661gmail-m_4516431807300526120m_-5126042985034769161gmail-m_7101967417692840746gmail-HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br><div class="m_8109201026088359661gmail-m_4516431807300526120m_-5126042985034769161gmail-m_7101967417692840746gmail-m_5221298026335215695gmail_signature"><div dir="ltr">Ehsan<br></div></div>
</font></span></div></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="m_8109201026088359661gmail-m_4516431807300526120m_-5126042985034769161gmail-m_7101967417692840746gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Cory Price<br></div>/ckprice<br></div></div></div></div>
</div></div>