<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <id>https://web.dev/</id>
  <title>Hongchan Choi on web.dev</title>
  <updated>2026-04-15T23:21:06Z</updated>
  <author>
    <name>Hongchan Choi</name>
  </author>
  <link href="https://web.dev/authors/hongchanchoi/feed.xml" rel="self"/>
  <link href="https://web.dev/"/>
  <icon>https://web-dev.imgix.net/image/admin/YbudG6EUF3JjB7u1iLey.jpg?auto=format</icon>
  <logo>https://web.dev/images/shared/rss-banner.png</logo>
  <subtitle>Software Engineer working on Chromium</subtitle>
  
  
  <entry>
    <title>Profiling Web Audio apps in Chrome</title>
    <link href="https://web.dev/profiling-web-audio-apps-in-chrome/"/>
    <updated>2020-05-04T00:00:00Z</updated>
    <id>https://web.dev/profiling-web-audio-apps-in-chrome/</id>
    <content type="html" mode="escaped">&lt;p&gt;You reached this article probably because you&#39;re developing an app that uses the
&lt;a href=&quot;https://developer.mozilla.org/docs/Web/API/Web_Audio_API&quot; rel=&quot;noopener&quot;&gt;Web Audio API&lt;/a&gt;
and experienced unexpected glitches such as popping noises from
the output, or you are hearing something unexpected. You might already be
involved in a &lt;a href=&quot;https://crbug.com/&quot; rel=&quot;noopener&quot;&gt;crbug.com&lt;/a&gt; discussion and a Chrome engineer
asked you to upload &amp;quot;tracing data&amp;quot; or look into the graph visualization. This
article shows how to obtain the relevant information so we can understand a
problem and eventually fix the underlying issue.&lt;/p&gt;
&lt;h2 id=&quot;web-audio-profiling-tools&quot;&gt;Web Audio profiling tools &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/profiling-web-audio-apps-in-chrome/#web-audio-profiling-tools&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;There are two tools that will help you when profiling Web Audio,
&lt;code&gt;about://tracing&lt;/code&gt; and the &lt;strong&gt;WebAudio&lt;/strong&gt; extension in Chrome DevTools.&lt;/p&gt;
&lt;h3 id=&quot;when-do-you-use-abouttracing&quot;&gt;When do you use &lt;code&gt;about://tracing&lt;/code&gt;? &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/profiling-web-audio-apps-in-chrome/#when-do-you-use-abouttracing&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;When mysterious &amp;quot;glitches&amp;quot; happen. Profiling the app with the tracing tools
gives you insights on:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Time slices spent by specific function calls&lt;/strong&gt; on different threads&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Audio callback timing&lt;/strong&gt; in the timeline view&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It usually shows missed audio callback deadlines or big garbage collection that
might cause unexpected audio glitches. This information is useful for
understanding an underlying problem, so Chromium engineers will often ask it
especially when the local reproduction is not feasible. The general
instructions for tracing are available &lt;a href=&quot;https://web.dev/profiling-web-audio-apps-in-chrome/chromium-tracing&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&quot;when-do-you-use-web-audio-devtools-extension&quot;&gt;When do you use Web Audio DevTools extension? &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/profiling-web-audio-apps-in-chrome/#when-do-you-use-web-audio-devtools-extension&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;When you want to visualize the audio graph and monitor how the audio renderer
performs in real time. The audio graph, a network of &lt;code&gt;AudioNode&lt;/code&gt; objects to
generate and synthesize an audio stream, often gets complex but the graph
topology is opaque by design. (The Web Audio API doesn’t have features for
node/graph introspection.) Some changes happen in your graph and now you hear
silence. Then it’s time for debugging by listening. It is never easy, and it
becomes more difficult when you have a bigger audio graph. The Web Audio
DevTools extension can help you by visualizing the graph.&lt;/p&gt;
&lt;p&gt;With this extension, you can monitor a running estimate of render capacity,
which indicates how the web audio renderer performs over a given render budget
(e.g. approximately 2.67ms @ 48KHz). If the capacity goes near 100 percent, that
means your app is likely to produce glitches because the renderer is failing to
finish the work in the given budget.&lt;/p&gt;
&lt;h2 id=&quot;use-abouttracing&quot;&gt;Use &lt;code&gt;about://tracing&lt;/code&gt; &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/profiling-web-audio-apps-in-chrome/#use-abouttracing&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id=&quot;how-to-capture-tracing-data&quot;&gt;How to capture tracing data &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/profiling-web-audio-apps-in-chrome/#how-to-capture-tracing-data&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;The instructions below written are for Chrome 80 and later.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;For best results, close all other tabs and windows, and disable extensions.
Alternatively you can either &lt;a href=&quot;https://developer.chrome.com/devtools/docs/clean-testing-environment&quot; rel=&quot;noopener&quot;&gt;launch a new instance of Chrome&lt;/a&gt;
or use other builds from &lt;a href=&quot;https://www.chromium.org/getting-involved/dev-channel&quot; rel=&quot;noopener&quot;&gt;different release channels&lt;/a&gt; (e.g.
Beta or Canary). Once you have the browser ready, follow the steps below:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Open your application (web page) on a tab.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Open another tab and go to &lt;code&gt;about://tracing&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Press the &lt;strong&gt;Record&lt;/strong&gt; button and select &lt;strong&gt;Manually select settings&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Press the &lt;strong&gt;None&lt;/strong&gt; buttons on both the &lt;strong&gt;Record Categories&lt;/strong&gt; and
&lt;strong&gt;Disabled by Default Categories&lt;/strong&gt; sections.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In the &lt;strong&gt;Record Categories&lt;/strong&gt; section, select the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;audio&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;blink_gc&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;media&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;v8.execute&lt;/code&gt; (if you&#39;re interested in &lt;code&gt;AudioWorklet&lt;/code&gt; JS code performance)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;webaudio&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In the &lt;strong&gt;Disabled by Default Categories&lt;/strong&gt; section, select the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;audio-worklet&lt;/code&gt; (if you&#39;re interested in where the &lt;code&gt;AudioWorklet&lt;/code&gt; thread starts)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;webaudio.audionode&lt;/code&gt; (if you need the detailed trace for each &lt;code&gt;AudioNode&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Press the &lt;strong&gt;Record&lt;/strong&gt; button at the bottom.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Go back to your application tab and redo the steps that triggered the issue.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;When you have enough trace data, go back to the tracing tab and press &lt;strong&gt;Stop&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The tracing tab will visualize the result.&lt;/p&gt;
&lt;img alt=&quot;Screen shot after tracing has completed.&quot; decoding=&quot;async&quot; height=&quot;525&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 800px) 800px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/3GqKLXTP7XzFp6ADztc4.jpg?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/3GqKLXTP7XzFp6ADztc4.jpg?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/3GqKLXTP7XzFp6ADztc4.jpg?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/3GqKLXTP7XzFp6ADztc4.jpg?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/3GqKLXTP7XzFp6ADztc4.jpg?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/3GqKLXTP7XzFp6ADztc4.jpg?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/3GqKLXTP7XzFp6ADztc4.jpg?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/3GqKLXTP7XzFp6ADztc4.jpg?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/3GqKLXTP7XzFp6ADztc4.jpg?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/3GqKLXTP7XzFp6ADztc4.jpg?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/3GqKLXTP7XzFp6ADztc4.jpg?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/3GqKLXTP7XzFp6ADztc4.jpg?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/3GqKLXTP7XzFp6ADztc4.jpg?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/3GqKLXTP7XzFp6ADztc4.jpg?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/3GqKLXTP7XzFp6ADztc4.jpg?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/3GqKLXTP7XzFp6ADztc4.jpg?auto=format&amp;w=1252 1252w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/3GqKLXTP7XzFp6ADztc4.jpg?auto=format&amp;w=1428 1428w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/3GqKLXTP7XzFp6ADztc4.jpg?auto=format&amp;w=1600 1600w&quot; width=&quot;800&quot; /&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Press &lt;strong&gt;Save&lt;/strong&gt; to save the tracing data.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;how-to-analyze-tracing-data&quot;&gt;How to analyze tracing data &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/profiling-web-audio-apps-in-chrome/#how-to-analyze-tracing-data&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The tracing data visualizes how Chrome&#39;s web audio engine renders the audio.
The renderer has two different render modes: &lt;strong&gt;Operating system mode&lt;/strong&gt; and
&lt;strong&gt;Worklet mode&lt;/strong&gt;. Each mode uses a different threading model, so the tracing
results also differ.&lt;/p&gt;
&lt;h4 id=&quot;operating-system-mode&quot;&gt;Operating system mode &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/profiling-web-audio-apps-in-chrome/#operating-system-mode&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;In operating system mode, the &lt;a href=&quot;https://source.chromium.org/chromium/chromium/src/+/master:media/audio/audio_output_device.h&quot; rel=&quot;noopener&quot;&gt;&lt;code&gt;AudioOutputDevice&lt;/code&gt;&lt;/a&gt; thread runs
all the web audio code. The &lt;code&gt;AudioOutputDevice&lt;/code&gt; is a real-time priority thread
originating from the browser&#39;s Audio Service that is driven by the audio
hardware clock. If you see irregularity from the trace data in this lane,
it means the callback timing from the device may be jittery. The combination
of Linux and Pulse Audio is known to have this problem. See the following Chromium issues
for more details: &lt;a href=&quot;https://crbug.com/825823&quot; rel=&quot;noopener&quot;&gt;#825823&lt;/a&gt;,
&lt;a href=&quot;https://crbug.com/864463&quot; rel=&quot;noopener&quot;&gt;#864463&lt;/a&gt;.&lt;/p&gt;
&lt;img alt=&quot;Screen shot of operating system mode tracing result.&quot; decoding=&quot;async&quot; height=&quot;398&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 800px) 800px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/Mf64zHw10phOMhU3gXsJ.jpg?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/Mf64zHw10phOMhU3gXsJ.jpg?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/Mf64zHw10phOMhU3gXsJ.jpg?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/Mf64zHw10phOMhU3gXsJ.jpg?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/Mf64zHw10phOMhU3gXsJ.jpg?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/Mf64zHw10phOMhU3gXsJ.jpg?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/Mf64zHw10phOMhU3gXsJ.jpg?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/Mf64zHw10phOMhU3gXsJ.jpg?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/Mf64zHw10phOMhU3gXsJ.jpg?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/Mf64zHw10phOMhU3gXsJ.jpg?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/Mf64zHw10phOMhU3gXsJ.jpg?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/Mf64zHw10phOMhU3gXsJ.jpg?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/Mf64zHw10phOMhU3gXsJ.jpg?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/Mf64zHw10phOMhU3gXsJ.jpg?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/Mf64zHw10phOMhU3gXsJ.jpg?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/Mf64zHw10phOMhU3gXsJ.jpg?auto=format&amp;w=1252 1252w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/Mf64zHw10phOMhU3gXsJ.jpg?auto=format&amp;w=1428 1428w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/Mf64zHw10phOMhU3gXsJ.jpg?auto=format&amp;w=1600 1600w&quot; width=&quot;800&quot; /&gt;
&lt;h4 id=&quot;worklet-mode&quot;&gt;Worklet mode &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/profiling-web-audio-apps-in-chrome/#worklet-mode&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;In Worklet Mode, which is characterized by one thread jump from
&lt;code&gt;AudioOutputDevice&lt;/code&gt; to the &lt;a href=&quot;https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/modules/webaudio/audio_worklet_thread.h&quot; rel=&quot;noopener&quot;&gt;&lt;code&gt;AudioWorklet&lt;/code&gt; thread&lt;/a&gt;, you
should see well-aligned traces in two thread lanes as shown below.  When the
worklet is activated all the web audio operations are rendered by the
&lt;code&gt;AudioWorklet&lt;/code&gt; thread. This thread is currently not a real-time priority one.
The common irregularity here is a big block caused by the garbage collection
or missed render deadlines. Both cases lead to glitches in the audio stream.&lt;/p&gt;
&lt;img alt=&quot;Screen shot of worklet mode tracing result.&quot; decoding=&quot;async&quot; height=&quot;449&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 800px) 800px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/2kSG5BoaXZ5CZIlVvIYI.png?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/2kSG5BoaXZ5CZIlVvIYI.png?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/2kSG5BoaXZ5CZIlVvIYI.png?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/2kSG5BoaXZ5CZIlVvIYI.png?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/2kSG5BoaXZ5CZIlVvIYI.png?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/2kSG5BoaXZ5CZIlVvIYI.png?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/2kSG5BoaXZ5CZIlVvIYI.png?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/2kSG5BoaXZ5CZIlVvIYI.png?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/2kSG5BoaXZ5CZIlVvIYI.png?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/2kSG5BoaXZ5CZIlVvIYI.png?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/2kSG5BoaXZ5CZIlVvIYI.png?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/2kSG5BoaXZ5CZIlVvIYI.png?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/2kSG5BoaXZ5CZIlVvIYI.png?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/2kSG5BoaXZ5CZIlVvIYI.png?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/2kSG5BoaXZ5CZIlVvIYI.png?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/2kSG5BoaXZ5CZIlVvIYI.png?auto=format&amp;w=1252 1252w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/2kSG5BoaXZ5CZIlVvIYI.png?auto=format&amp;w=1428 1428w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/2kSG5BoaXZ5CZIlVvIYI.png?auto=format&amp;w=1600 1600w&quot; width=&quot;800&quot; /&gt;
&lt;p&gt;In both cases, the ideal tracing data is characterized by well-aligned audio
device callback invocations and render tasks being completed well within the
given render budget. The two screenshots above are great examples of the ideal
tracing data.&lt;/p&gt;
&lt;h3 id=&quot;learning-from-real-world-examples&quot;&gt;Learning from real-world examples &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/profiling-web-audio-apps-in-chrome/#learning-from-real-world-examples&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;h4 id=&quot;example-1-render-tasks-going-beyond-render-budget&quot;&gt;Example 1: Render tasks going beyond render budget &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/profiling-web-audio-apps-in-chrome/#example-1-render-tasks-going-beyond-render-budget&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;The screenshot below (&lt;a href=&quot;https://crbug.com/796330&quot; rel=&quot;noopener&quot;&gt;Chromium issue #796330&lt;/a&gt;) is a
typical example of when code in &lt;code&gt;AudioWorkletProcessor&lt;/code&gt; takes too long and
goes beyond a given render budget. The callback timing is well behaved but
the audio processing function call of the Web Audio API failed to complete the
work before the next device callback.&lt;/p&gt;
&lt;img alt=&quot;Diagram showing audio glitch due to render task overflowing budget.&quot; decoding=&quot;async&quot; height=&quot;362&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 734px) 734px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/J3CkP24NupnqB1XDGH6w.png?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/J3CkP24NupnqB1XDGH6w.png?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/J3CkP24NupnqB1XDGH6w.png?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/J3CkP24NupnqB1XDGH6w.png?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/J3CkP24NupnqB1XDGH6w.png?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/J3CkP24NupnqB1XDGH6w.png?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/J3CkP24NupnqB1XDGH6w.png?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/J3CkP24NupnqB1XDGH6w.png?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/J3CkP24NupnqB1XDGH6w.png?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/J3CkP24NupnqB1XDGH6w.png?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/J3CkP24NupnqB1XDGH6w.png?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/J3CkP24NupnqB1XDGH6w.png?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/J3CkP24NupnqB1XDGH6w.png?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/J3CkP24NupnqB1XDGH6w.png?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/J3CkP24NupnqB1XDGH6w.png?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/J3CkP24NupnqB1XDGH6w.png?auto=format&amp;w=1252 1252w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/J3CkP24NupnqB1XDGH6w.png?auto=format&amp;w=1428 1428w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/J3CkP24NupnqB1XDGH6w.png?auto=format&amp;w=1468 1468w&quot; width=&quot;734&quot; /&gt;
&lt;p&gt;&lt;strong&gt;Your options:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Reduce the workload of the audio graph by using fewer &lt;code&gt;AudioNode&lt;/code&gt; instances.&lt;/li&gt;
&lt;li&gt;Reduce the workload of your code in the &lt;code&gt;AudioWorkletProcessor&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Increase the base latency of &lt;code&gt;AudioContext&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;example-2-significant-garbage-collection-on-the-worklet-thread&quot;&gt;Example 2: Significant garbage collection on the worklet thread &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/profiling-web-audio-apps-in-chrome/#example-2-significant-garbage-collection-on-the-worklet-thread&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Unlike on the operating system audio rendering thread, garbage collection is managed
on the worklet thread. That means if your code does memory allocation/deallocation
(e.g. new arrays) it eventually triggers a garbage collection which
synchronously blocks the thread. If the workload of web audio operations and
garbage collection is bigger than a given render budget, it results in
glitches in the audio stream. The following screenshot is an extreme example of this
case.&lt;/p&gt;
&lt;img alt=&quot;Audio glitches caused by garbage collection.&quot; decoding=&quot;async&quot; height=&quot;334&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 800px) 800px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/ckdPwqnRtoHsRQkOVy8J.png?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/ckdPwqnRtoHsRQkOVy8J.png?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/ckdPwqnRtoHsRQkOVy8J.png?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/ckdPwqnRtoHsRQkOVy8J.png?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/ckdPwqnRtoHsRQkOVy8J.png?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/ckdPwqnRtoHsRQkOVy8J.png?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/ckdPwqnRtoHsRQkOVy8J.png?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/ckdPwqnRtoHsRQkOVy8J.png?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/ckdPwqnRtoHsRQkOVy8J.png?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/ckdPwqnRtoHsRQkOVy8J.png?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/ckdPwqnRtoHsRQkOVy8J.png?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/ckdPwqnRtoHsRQkOVy8J.png?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/ckdPwqnRtoHsRQkOVy8J.png?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/ckdPwqnRtoHsRQkOVy8J.png?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/ckdPwqnRtoHsRQkOVy8J.png?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/ckdPwqnRtoHsRQkOVy8J.png?auto=format&amp;w=1252 1252w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/ckdPwqnRtoHsRQkOVy8J.png?auto=format&amp;w=1428 1428w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/ckdPwqnRtoHsRQkOVy8J.png?auto=format&amp;w=1600 1600w&quot; width=&quot;800&quot; /&gt;
&lt;p&gt;&lt;strong&gt;Your options:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Allocate the memory up front and reuse it whenever possible.&lt;/li&gt;
&lt;li&gt;Use different design patterns based on &lt;code&gt;SharedArrayBuffer&lt;/code&gt;. Although this
is not a perfect solution, several web audio apps use a similar pattern with
&lt;code&gt;SharedArrayBuffer&lt;/code&gt; to run the intensive audio code. Examples:
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://developer.chrome.com/blog/audio-worklet-design-pattern/#webaudio-powerhouse-audio-worklet-and-sharedarraybuffer&quot; rel=&quot;noopener&quot;&gt;Audio Worklet Design Pattern&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;example-3-jittery-audio-device-callback-from-audiooutputdevice&quot;&gt;Example 3: Jittery audio device callback from &lt;code&gt;AudioOutputDevice&lt;/code&gt; &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/profiling-web-audio-apps-in-chrome/#example-3-jittery-audio-device-callback-from-audiooutputdevice&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;The precise timing of audio callback is the most important thing for web audio.
This should be the most precise clock in your system. If the operating system
or its audio subsystem cannot guarantee a solid callback timing, all the
subsequent operations will be affected. The following image is an example
of jittery audio callback. Compared to the previous two images, the interval
between each callback varies significantly.&lt;/p&gt;
&lt;img alt=&quot;Screen shot comparing unstable vs stable callback timing.&quot; decoding=&quot;async&quot; height=&quot;252&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 800px) 800px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/1UN5udXOW56ooihw5M18.png?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/1UN5udXOW56ooihw5M18.png?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/1UN5udXOW56ooihw5M18.png?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/1UN5udXOW56ooihw5M18.png?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/1UN5udXOW56ooihw5M18.png?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/1UN5udXOW56ooihw5M18.png?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/1UN5udXOW56ooihw5M18.png?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/1UN5udXOW56ooihw5M18.png?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/1UN5udXOW56ooihw5M18.png?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/1UN5udXOW56ooihw5M18.png?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/1UN5udXOW56ooihw5M18.png?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/1UN5udXOW56ooihw5M18.png?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/1UN5udXOW56ooihw5M18.png?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/1UN5udXOW56ooihw5M18.png?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/1UN5udXOW56ooihw5M18.png?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/1UN5udXOW56ooihw5M18.png?auto=format&amp;w=1252 1252w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/1UN5udXOW56ooihw5M18.png?auto=format&amp;w=1428 1428w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/1UN5udXOW56ooihw5M18.png?auto=format&amp;w=1600 1600w&quot; width=&quot;800&quot; /&gt;
&lt;p&gt;&lt;strong&gt;Your options:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Increase the system audio callback buffer size by adjusting the
&lt;a href=&quot;https://webaudio.github.io/web-audio-api/#dom-audiocontextoptions-latencyhint&quot; rel=&quot;noopener&quot;&gt;&lt;code&gt;latencyHint&lt;/code&gt;&lt;/a&gt;
option.&lt;/li&gt;
&lt;li&gt;If you find a problem, &lt;a href=&quot;https://bugs.chromium.org/p/chromium/issues/entry?components=Blink%3EWebAudio&quot; rel=&quot;noopener&quot;&gt;file an issue on crbug.com&lt;/a&gt;
with the tracing data.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;use-the-web-audio-devtools-extension&quot;&gt;Use the Web Audio DevTools extension &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/profiling-web-audio-apps-in-chrome/#use-the-web-audio-devtools-extension&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;You can also use the DevTools extension specifically designed for the Web Audio API.
Unlike the tracing tool, this provides real time inspection of graphs and
performance metrics.&lt;/p&gt;
&lt;p&gt;This extension needs to be installed from the
&lt;a href=&quot;https://chrome.google.com/webstore/detail/audion/cmhomipkklckpomafalojobppmmidlgl&quot; rel=&quot;noopener&quot;&gt;Chrome Web Store&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;After the installation, you access the panel by opening Chrome DevTools and
clicking “Web Audio” on the top menu.&lt;/p&gt;
&lt;img alt=&quot;Screenshot showing how to open Web Audio panel in Chrome DevTools.&quot; decoding=&quot;async&quot; height=&quot;201&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 800px) 800px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/vvhSqZboQoZZN9wBvoXq72wzGAf1/JUXLwtX83TOXqRHD2CGU.png?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/vvhSqZboQoZZN9wBvoXq72wzGAf1/JUXLwtX83TOXqRHD2CGU.png?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/vvhSqZboQoZZN9wBvoXq72wzGAf1/JUXLwtX83TOXqRHD2CGU.png?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/vvhSqZboQoZZN9wBvoXq72wzGAf1/JUXLwtX83TOXqRHD2CGU.png?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/vvhSqZboQoZZN9wBvoXq72wzGAf1/JUXLwtX83TOXqRHD2CGU.png?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/vvhSqZboQoZZN9wBvoXq72wzGAf1/JUXLwtX83TOXqRHD2CGU.png?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/vvhSqZboQoZZN9wBvoXq72wzGAf1/JUXLwtX83TOXqRHD2CGU.png?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/vvhSqZboQoZZN9wBvoXq72wzGAf1/JUXLwtX83TOXqRHD2CGU.png?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/vvhSqZboQoZZN9wBvoXq72wzGAf1/JUXLwtX83TOXqRHD2CGU.png?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/vvhSqZboQoZZN9wBvoXq72wzGAf1/JUXLwtX83TOXqRHD2CGU.png?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/vvhSqZboQoZZN9wBvoXq72wzGAf1/JUXLwtX83TOXqRHD2CGU.png?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/vvhSqZboQoZZN9wBvoXq72wzGAf1/JUXLwtX83TOXqRHD2CGU.png?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/vvhSqZboQoZZN9wBvoXq72wzGAf1/JUXLwtX83TOXqRHD2CGU.png?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/vvhSqZboQoZZN9wBvoXq72wzGAf1/JUXLwtX83TOXqRHD2CGU.png?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/vvhSqZboQoZZN9wBvoXq72wzGAf1/JUXLwtX83TOXqRHD2CGU.png?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/vvhSqZboQoZZN9wBvoXq72wzGAf1/JUXLwtX83TOXqRHD2CGU.png?auto=format&amp;w=1252 1252w, https://web-dev.imgix.net/image/vvhSqZboQoZZN9wBvoXq72wzGAf1/JUXLwtX83TOXqRHD2CGU.png?auto=format&amp;w=1428 1428w, https://web-dev.imgix.net/image/vvhSqZboQoZZN9wBvoXq72wzGAf1/JUXLwtX83TOXqRHD2CGU.png?auto=format&amp;w=1600 1600w&quot; width=&quot;800&quot; /&gt;
&lt;p&gt;The Web Audio panel has four components: context selector, property inspector,
graph visualizer, and performance monitor.&lt;/p&gt;
&lt;img alt=&quot;Screenshot of the Web Audio panel in Chrome DevTools.&quot; decoding=&quot;async&quot; height=&quot;416&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 800px) 800px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/vvhSqZboQoZZN9wBvoXq72wzGAf1/4xQhLJBdDWW3X2nIssIS.png?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/vvhSqZboQoZZN9wBvoXq72wzGAf1/4xQhLJBdDWW3X2nIssIS.png?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/vvhSqZboQoZZN9wBvoXq72wzGAf1/4xQhLJBdDWW3X2nIssIS.png?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/vvhSqZboQoZZN9wBvoXq72wzGAf1/4xQhLJBdDWW3X2nIssIS.png?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/vvhSqZboQoZZN9wBvoXq72wzGAf1/4xQhLJBdDWW3X2nIssIS.png?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/vvhSqZboQoZZN9wBvoXq72wzGAf1/4xQhLJBdDWW3X2nIssIS.png?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/vvhSqZboQoZZN9wBvoXq72wzGAf1/4xQhLJBdDWW3X2nIssIS.png?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/vvhSqZboQoZZN9wBvoXq72wzGAf1/4xQhLJBdDWW3X2nIssIS.png?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/vvhSqZboQoZZN9wBvoXq72wzGAf1/4xQhLJBdDWW3X2nIssIS.png?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/vvhSqZboQoZZN9wBvoXq72wzGAf1/4xQhLJBdDWW3X2nIssIS.png?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/vvhSqZboQoZZN9wBvoXq72wzGAf1/4xQhLJBdDWW3X2nIssIS.png?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/vvhSqZboQoZZN9wBvoXq72wzGAf1/4xQhLJBdDWW3X2nIssIS.png?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/vvhSqZboQoZZN9wBvoXq72wzGAf1/4xQhLJBdDWW3X2nIssIS.png?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/vvhSqZboQoZZN9wBvoXq72wzGAf1/4xQhLJBdDWW3X2nIssIS.png?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/vvhSqZboQoZZN9wBvoXq72wzGAf1/4xQhLJBdDWW3X2nIssIS.png?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/vvhSqZboQoZZN9wBvoXq72wzGAf1/4xQhLJBdDWW3X2nIssIS.png?auto=format&amp;w=1252 1252w, https://web-dev.imgix.net/image/vvhSqZboQoZZN9wBvoXq72wzGAf1/4xQhLJBdDWW3X2nIssIS.png?auto=format&amp;w=1428 1428w, https://web-dev.imgix.net/image/vvhSqZboQoZZN9wBvoXq72wzGAf1/4xQhLJBdDWW3X2nIssIS.png?auto=format&amp;w=1600 1600w&quot; width=&quot;800&quot; /&gt;
&lt;h3 id=&quot;context-selector&quot;&gt;Context Selector &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/profiling-web-audio-apps-in-chrome/#context-selector&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Since a page can have multiple &lt;code&gt;BaseAudioContext&lt;/code&gt; objects, this drop-down menu allows you
choosing the context you want to inspect. You can also manually trigger garbage
collection by clicking the trash can icon on the left.&lt;/p&gt;
&lt;h3 id=&quot;property-inspector&quot;&gt;Property Inspector &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/profiling-web-audio-apps-in-chrome/#property-inspector&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The side panel shows various properties of a user-selected context or
&lt;code&gt;AudioNode&lt;/code&gt;. Inspecting dynamic values in &lt;code&gt;AudioParam&lt;/code&gt; is not supported.&lt;/p&gt;
&lt;h3 id=&quot;graph-visualizer&quot;&gt;Graph Visualizer &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/profiling-web-audio-apps-in-chrome/#graph-visualizer&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;This view renders the current graph topology of a user-selected context. This
visualization changes dynamically in real time. By clicking an element in the
visualization, you can inspect the detailed information on the property
inspector.&lt;/p&gt;
&lt;h3 id=&quot;performance-monitor&quot;&gt;Performance Monitor &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/profiling-web-audio-apps-in-chrome/#performance-monitor&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The status bar at the bottom is only active when the selected &lt;code&gt;BaseAudioContext&lt;/code&gt;
is an &lt;code&gt;AudioContext&lt;/code&gt;, which runs in real-time. This bar shows the instantaneous
audio stream quality of a selected &lt;code&gt;AudioContext&lt;/code&gt; and is updated every second. It
provides the following information:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Callback interval&lt;/strong&gt; (ms): Displays the weighted mean/variance of callback
interval. Ideally the mean should be stable and the variance should be close
to zero. If you see a large variance, it means that the system-level audio
callback function has unstable timing that can lead to poor audio stream
quality. (See example 3, above.)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Render Capacity&lt;/strong&gt; (percent): When the capacity gets close to 100 percent, it
means that the renderer is doing too much for a given render budget, so you
should consider doing less (e.g. using fewer &lt;code&gt;AudioNodes&lt;/code&gt; objects in the
graph).&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can manually trigger a garbage collector by clicking the trash can icon.&lt;/p&gt;
&lt;h2 id=&quot;legacy-webaudio-devtools-panel&quot;&gt;Legacy WebAudio DevTools panel &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/profiling-web-audio-apps-in-chrome/#legacy-webaudio-devtools-panel&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The extension is now a recommended method by the Chrome Web Audio team, but the
legacy WebAudio DevTools panel is also available. You can access this panel by
clicking the &amp;quot;three dots&amp;quot; menu in the top right corner of DevTools, then going to
&lt;strong&gt;More tools&lt;/strong&gt;, then &lt;strong&gt;WebAudio&lt;/strong&gt;.&lt;/p&gt;
&lt;img alt=&quot;Screen shot showing how to open WebAudio panel in Chrome DevTools.&quot; decoding=&quot;async&quot; height=&quot;423&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 800px) 800px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/t2eX431PTio5oOFkmOtR.jpg?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/t2eX431PTio5oOFkmOtR.jpg?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/t2eX431PTio5oOFkmOtR.jpg?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/t2eX431PTio5oOFkmOtR.jpg?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/t2eX431PTio5oOFkmOtR.jpg?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/t2eX431PTio5oOFkmOtR.jpg?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/t2eX431PTio5oOFkmOtR.jpg?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/t2eX431PTio5oOFkmOtR.jpg?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/t2eX431PTio5oOFkmOtR.jpg?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/t2eX431PTio5oOFkmOtR.jpg?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/t2eX431PTio5oOFkmOtR.jpg?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/t2eX431PTio5oOFkmOtR.jpg?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/t2eX431PTio5oOFkmOtR.jpg?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/t2eX431PTio5oOFkmOtR.jpg?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/t2eX431PTio5oOFkmOtR.jpg?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/t2eX431PTio5oOFkmOtR.jpg?auto=format&amp;w=1252 1252w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/t2eX431PTio5oOFkmOtR.jpg?auto=format&amp;w=1428 1428w, https://web-dev.imgix.net/image/tcFciHGuF3MxnTr1y5ue01OGLBn2/t2eX431PTio5oOFkmOtR.jpg?auto=format&amp;w=1600 1600w&quot; width=&quot;800&quot; /&gt;
&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/profiling-web-audio-apps-in-chrome/#conclusion&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Debugging audio is hard. Debugging audio in the browser is even harder. However,
these tools can ease the pain by providing you with useful insights on how the
web audio code performs. In some cases, however, you may find problems in Chrome
or the extension. Then do not be afraid to
&lt;a href=&quot;https://bugs.chromium.org/p/chromium/issues/entry?components=Blink%3EWebAudio&quot; rel=&quot;noopener&quot;&gt;file a bug on crbug.com&lt;/a&gt; or on the
&lt;a href=&quot;https://github.com/GoogleChrome/audion/issues&quot; rel=&quot;noopener&quot;&gt;extension issue tracker&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Photo by Jonathan Velasquez on &lt;a href=&quot;https://unsplash.com/photos/c1ZN57GfDB0&quot; rel=&quot;noopener&quot;&gt;Unsplash&lt;/a&gt;&lt;/p&gt;
</content>
    <author>
      <name>Hongchan Choi</name>
    </author>
  </entry>
</feed>
