{"id":401,"date":"2022-07-29T07:18:54","date_gmt":"2022-07-29T14:18:54","guid":{"rendered":"https:\/\/blog.mozilla.org\/performance\/?p=401"},"modified":"2023-02-01T03:21:31","modified_gmt":"2023-02-01T11:21:31","slug":"performance-tools-newsletter-h1-2022","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/performance\/2022\/07\/29\/performance-tools-newsletter-h1-2022\/","title":{"rendered":"Performance Tools Newsletter (H1 2022)"},"content":{"rendered":"<p>As the Perf-Tools team, we are responsible for the <a href=\"https:\/\/profiler.firefox.com\/\">Firefox Profiler<\/a>. This newsletter gives an overview of the new features and improvements we\u2019ve done in the first half of 2022.<\/p>\n<p>You can find the previous newsletter <a href=\"https:\/\/blog.mozilla.org\/performance\/2022\/02\/15\/performance-tools-newsletter-q4-2021\/\">here<\/a> which was about the Q4 2021. This newsletter contains updates related to work done in the first half of 2022.<\/p>\n<p>Here are some highlights.<\/p>\n<h2>Documentation<\/h2>\n<p>The main Profiler documentation was refreshed, to better match what has changed in recent years.<\/p>\n<p>If you are new to the Profiler, or if you would like your friends, colleagues, or customers to learn about it, please visit: <a href=\"https:\/\/profiler.firefox.com\/docs\/#\/.\/guide-getting-started\">https:\/\/profiler.firefox.com\/docs\/#\/.\/guide-getting-started<\/a>.<br \/>\n(This link is also accessible from the landing page at <a href=\"https:\/\/profiler.firefox.com\">https:\/\/profiler.firefox.com<\/a>.)<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-402 aligncenter\" src=\"http:\/\/blog.mozilla.org\/performance\/files\/2022\/07\/profiler-docs-getting-started.png\" alt=\"Screenshot of the top of https:\/\/profiler.firefox.com\/docs\/#\/.\/guide-getting-started\" width=\"1102\" height=\"769\" srcset=\"https:\/\/blog.mozilla.org\/performance\/files\/2022\/07\/profiler-docs-getting-started.png 1102w, https:\/\/blog.mozilla.org\/performance\/files\/2022\/07\/profiler-docs-getting-started-300x209.png 300w, https:\/\/blog.mozilla.org\/performance\/files\/2022\/07\/profiler-docs-getting-started-600x419.png 600w, https:\/\/blog.mozilla.org\/performance\/files\/2022\/07\/profiler-docs-getting-started-768x536.png 768w, https:\/\/blog.mozilla.org\/performance\/files\/2022\/07\/profiler-docs-getting-started-1000x698.png 1000w\" sizes=\"(max-width: 1102px) 100vw, 1102px\" \/><\/p>\n<p>As a reminder, other aspects of the Profiler are captured in separate locations:<\/p>\n<p>For developers of the Firefox application, or if you are just interested in some technical details, see the internal documentation at <a href=\"https:\/\/firefox-source-docs.mozilla.org\/tools\/profiler\/\">https:\/\/firefox-source-docs.mozilla.org\/tools\/profiler\/<\/a>.<\/p>\n<p>For web developers, one point of interest is that you can add &#8220;markers&#8221; to your own pages through the JavaScript <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/User_Timing_API\">User Timing API<\/a>, which will then be visible in profiles. This can be useful to measure some specific actions in your web pages.<\/p>\n<p>Finally, the GitHub repository for the front-end side of the Profiler (the website that actually displays profiles after they have been captured) contains <a href=\"https:\/\/github.com\/firefox-devtools\/profiler\/tree\/main\/docs-developer\">some detailed documentation<\/a> about profile file formats and inner workings of the website.<\/p>\n<h2>New DevTools performance panel<\/h2>\n<p>The new performance panel was released in Firefox 98. This panel makes it easier for web developers to record and share profiles, as it opens a new profiler.firefox.com tab after capturing the profile.<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-403 aligncenter\" src=\"http:\/\/blog.mozilla.org\/performance\/files\/2022\/07\/devtools-perf.png\" alt=\"Screenshot of the devtools performance panel\" width=\"466\" height=\"394\" srcset=\"https:\/\/blog.mozilla.org\/performance\/files\/2022\/07\/devtools-perf.png 466w, https:\/\/blog.mozilla.org\/performance\/files\/2022\/07\/devtools-perf-300x254.png 300w\" sizes=\"(max-width: 466px) 100vw, 466px\" \/><\/p>\n<p>To access it, open the DevTools (main menu &gt; More tools &gt; Web Developer Tools), and select the &#8220;Performance&#8221; panel.<\/p>\n<p>Note that having the DevTools open may use some processing power, so the resulting profile of any web page may be slightly skewed, with some of the profile data being related to DevTools. If these effects are noticeable in your profiles, just close the DevTools window while profiling. As an alternative, you may choose to control the profiler through the toolbar button (enabled when first visiting <a href=\"https:\/\/profiler.firefox.com\">https:\/\/profiler.firefox.com<\/a>), or the accompanying shortcuts: Ctrl+Shift+1 to start, and Ctrl+Shift+2 to stop.<\/p>\n<h2>Internationalization<\/h2>\n<p>The profiler.firefox.com interface is now available in languages other than English, and may be changed on the fly from the language picker at the bottom right corner<img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-404 aligncenter\" src=\"http:\/\/blog.mozilla.org\/performance\/files\/2022\/07\/profile-language-picker.png\" alt=\"Screenshot of the language picker\" width=\"272\" height=\"379\" \/>You may request new languages, and contribute, at <a href=\"https:\/\/pontoon.mozilla.org\/projects\/firefox-profiler\/\">https:\/\/pontoon.mozilla.org\/projects\/firefox-profiler\/<\/a> after signing in with a Firefox Account.<\/p>\n<h2>Markers<\/h2>\n<p>A number of improvements happened around markers: how they&#8217;re collected, some new useful markers that were added around Firefox, and how they are better presented.<\/p>\n<ul>\n<li aria-level=\"1\">Instant markers (those without duration) with the same name are now grouped in the top line, instead of being sprinkled semi-randomly among interval markers. And they are all displayed as diamond shapes, making it easier to notice multiple adjacent markers.<\/li>\n<li>Interval markers are now all displayed as rectangles with a visible darker outline, which better indicates if and where they start and stop. Very short markers that fit in 1 pixel look like dark vertical lines.<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-405 aligncenter\" src=\"http:\/\/blog.mozilla.org\/performance\/files\/2022\/07\/profiler-marker-display.png\" alt=\"Examples of different marker displays\" width=\"475\" height=\"194\" srcset=\"https:\/\/blog.mozilla.org\/performance\/files\/2022\/07\/profiler-marker-display.png 475w, https:\/\/blog.mozilla.org\/performance\/files\/2022\/07\/profiler-marker-display-300x123.png 300w\" sizes=\"(max-width: 475px) 100vw, 475px\" \/><\/li>\n<li>Inter-Process Communication (IPC) markers are now captured from any thread, even those not currently being profiled, in order to give a more complete picture of interactions between Firefox processes. These messages have become more numerous and important since <a href=\"https:\/\/hacks.mozilla.org\/2021\/05\/introducing-firefox-new-site-isolation-security-architecture\/\">site isolation was improved<\/a> by using separate Operating System processes for each web server address \u2013 so that web servers cannot spy on each other through a common web page.<br \/>\nIPC markers also have a new context menu option, to select the other thread on the other side of the IPC message channel.<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-406 aligncenter\" src=\"http:\/\/blog.mozilla.org\/performance\/files\/2022\/07\/profiler-marker-ipc-from-to.png\" alt=\"IPC marker context menu showing &quot;Select the send thread&quot;, and from there an arrow pointing at the corresponding marker for the IPC that was sent.\" width=\"1563\" height=\"424\" srcset=\"https:\/\/blog.mozilla.org\/performance\/files\/2022\/07\/profiler-marker-ipc-from-to.png 1563w, https:\/\/blog.mozilla.org\/performance\/files\/2022\/07\/profiler-marker-ipc-from-to-300x81.png 300w, https:\/\/blog.mozilla.org\/performance\/files\/2022\/07\/profiler-marker-ipc-from-to-600x163.png 600w, https:\/\/blog.mozilla.org\/performance\/files\/2022\/07\/profiler-marker-ipc-from-to-768x208.png 768w, https:\/\/blog.mozilla.org\/performance\/files\/2022\/07\/profiler-marker-ipc-from-to-1536x417.png 1536w, https:\/\/blog.mozilla.org\/performance\/files\/2022\/07\/profiler-marker-ipc-from-to-1000x271.png 1000w\" sizes=\"(max-width: 1563px) 100vw, 1563px\" \/><\/li>\n<li><code>\"Awake\"<\/code>: In most threads, this shows the actual time spent running tasks (as opposed to waiting for these tasks). It also includes how much CPU is spent, and where available which CPU core ran it, and at which priority level. These markers are especially useful to see how often and when a thread woke up.<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-407 aligncenter\" src=\"http:\/\/blog.mozilla.org\/performance\/files\/2022\/07\/profiler-awake.png\" alt=\"&quot;Awake&quot; marker tooltip, with duration, CPU Id, and priority details\" width=\"390\" height=\"191\" srcset=\"https:\/\/blog.mozilla.org\/performance\/files\/2022\/07\/profiler-awake.png 390w, https:\/\/blog.mozilla.org\/performance\/files\/2022\/07\/profiler-awake-300x147.png 300w\" sizes=\"(max-width: 390px) 100vw, 390px\" \/><\/li>\n<li><code>\"DLLLoad\"<\/code>: Time spent loading DLLs on Windows.<\/li>\n<li><code>\"Set\/Sample\/Clear Animation\"<\/code> markers on the compositor thread.<\/li>\n<li aria-level=\"1\">DOMEvent and CSS Animation\/Transition markers now show the target of the event\/animation<\/li>\n<li aria-level=\"1\">Screenshot marker tooltips now show the actual screenshot.<\/li>\n<li aria-level=\"1\">New context menu option &#8220;Copy page URL&#8221;.<\/li>\n<\/ul>\n<h2>Other improvements<\/h2>\n<ul>\n<li aria-level=\"1\">We now support profiling of private browsing windows. Previously we were disabling the profiler as soon as a private window was opened. Now we profile them but mark everything as coming from a private window, so that we can remove the data if the profile is shared (which is the default).<\/li>\n<li aria-level=\"1\">Per-process CPU utilization. The feature is still marked as experimental but should be usable. Enable it in about:profiling, and when viewing the profile, open the JavaScript console and run experimental.enableProcessCPUTracks() to show the graphs.<br \/>\nIn particular, it can highlight work done in the whole process, which may not happen in the currently-visible threads; If you notice some high values there, but cannot find the corresponding work in individual threads, consider selecting more threads to profile before re-running the profiler.<br \/>\nFor example, in the following screenshot the zone marked \u2460 looks idle in the main thread; but the &#8220;Process CPU&#8221; reveals that there was significant activity at \u2461 in this process, and a bit of exploring hidden threads found that the &#8220;StyleThreads&#8221; at \u2462 were the ones working hard at that time.<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-408 aligncenter\" src=\"http:\/\/blog.mozilla.org\/performance\/files\/2022\/07\/profiler-process-cpu.png\" alt=\"Profile with Process CPU track, see text above for explanation\" width=\"474\" height=\"178\" srcset=\"https:\/\/blog.mozilla.org\/performance\/files\/2022\/07\/profiler-process-cpu.png 474w, https:\/\/blog.mozilla.org\/performance\/files\/2022\/07\/profiler-process-cpu-300x113.png 300w\" sizes=\"(max-width: 474px) 100vw, 474px\" \/><\/li>\n<li aria-level=\"1\">Ability to capture stack traces on all versions of Firefox for macos. It used to only work on some pre-release channels.<\/li>\n<li aria-level=\"1\">Profiling data from early times during a process startup used to be split in their own tracks (annotated with &#8220;pre-xul&#8221;), they are now combined with the correct threads past this early startup phase.<\/li>\n<li aria-level=\"1\">The memory track&#8217;s tooltip now shows the number of memory operations performed between two samples.<\/li>\n<li aria-level=\"1\">Animations were removed from various places for users with <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/@media\/prefers-reduced-motion#user_preferences\">prefer-reduced-motion<\/a>.<\/li>\n<li aria-level=\"1\">Profiles captured from <a href=\"https:\/\/perf.wiki.kernel.org\/index.php\/Main_Page\">Linux perf<\/a> now distinguish kernel and user frames with different colors. (Thank you to contributor Dave Rigby.)<\/li>\n<li aria-level=\"1\">Experimental support for capturing actual power usage (not just CPU utilization times) on some platforms (Windows 11 and Apple Silicon as of this writing). This work is still progressing, and will bring another set of measurements that are very important to improve the performance of Firefox and websites.<\/li>\n<li aria-level=\"1\">Miscellaneous internal performance improvements of the Profiler itself, to better handle capturing and displaying more and more data.<\/li>\n<\/ul>\n<h2>Meet the team, and get help<\/h2>\n<p>If you profiled something and are puzzled with the profile you captured, we have the Joy of Profiling (<a href=\"https:\/\/matrix.to\/#\/%23joy-of-profiling:mozilla.org\">#joy-of-profiling:mozilla.org<\/a>) channel where people share their profiles and get help from the people who are more familiar with the Firefox Profiler. If you&#8217;re interested in the Profiler itself, our main channel is <a href=\"https:\/\/matrix.to\/#\/#profiler:mozilla.org\">https:\/\/matrix.to\/#\/#profiler:mozilla.org<\/a>.<\/p>\n<p>We also have Joy of Profiling Open Sessions where people bring their profile and we try to analyze the profile together over Zoom. See the <a href=\"https:\/\/calendar.google.com\/calendar\/embed?src=c_cbjhkf8gu6anajlklhuo04hpko@group.calendar.google.com\">Performance Office Hours calendar<\/a>.<\/p>\n<p>And if you would just like to see some Firefox developers analyze profiles, watch Mike Conley and friends in the original <a href=\"https:\/\/mozilla.hosted.panopto.com\/Panopto\/Pages\/Sessions\/List.aspx#folderID=%22531314ae-5e3b-40d3-8a56-ac48011c18ea%22\">Joy of Profiling<\/a>, &#8220;unscripted, unplanned, uncensored, and true to life&#8221;.<\/p>\n<p>&nbsp;<\/p>\n<p>Until next time, Happy Profiling!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As the Perf-Tools team, we are responsible for the Firefox Profiler. This newsletter gives an overview of the new features and improvements we\u2019ve done in the first half of 2022. &hellip; <a class=\"go\" href=\"https:\/\/blog.mozilla.org\/performance\/2022\/07\/29\/performance-tools-newsletter-h1-2022\/\">Read more<\/a><\/p>\n","protected":false},"author":1874,"featured_media":409,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[779],"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/performance\/wp-json\/wp\/v2\/posts\/401"}],"collection":[{"href":"https:\/\/blog.mozilla.org\/performance\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mozilla.org\/performance\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/performance\/wp-json\/wp\/v2\/users\/1874"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/performance\/wp-json\/wp\/v2\/comments?post=401"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/performance\/wp-json\/wp\/v2\/posts\/401\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/performance\/wp-json\/wp\/v2\/media\/409"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/performance\/wp-json\/wp\/v2\/media?parent=401"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/performance\/wp-json\/wp\/v2\/categories?post=401"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/performance\/wp-json\/wp\/v2\/tags?post=401"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}