title: Does jQuery slow down the rendering of webpages by 100ms or more?
body: <p>I am trying to improve the frontend page load speed for users, and I am finding that jQuery is slowing the DomContentLoaded event down by more than 100ms. </p>
  
  <p>I am benchmarking on Windows 7 with Chrome 17 using a computer with an i5 2.5Ghz, SSD drive, and 8GB of RAM. The test is run on my local computer. I'm concerned that the slow speed I see on my machine will be even slower on older computers and browsers. </p>
  
  <p>Is this just the standard penalty for using jQuery, or is there a way to speed up the performance that I am missing? </p>
  
  <p>Here is the code that I am using:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;script type="text/javascript"&gt;
              console.time("DOMContentLoaded");
          &lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;h1&gt;Hello World&lt;/h1&gt;
  
          &lt;script type="text/javascript" src="/js/jquery-1.7.1.min.js"&gt;&lt;/script&gt;
  
          &lt;script type="text/javascript"&gt;
              document.addEventListener( "DOMContentLoaded", ready, false );
  
              function ready() {
                  console.timeEnd("DOMContentLoaded");
              }
          &lt;/script&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>On the console, the time that I see is roughly ~100ms. </p>
  
  <p>When I remove the line that loads jQuery, the time is roughly ~1ms. </p>
  
  <p>I also tried the code above using the Google CDN:</p>
  
  <pre><code> &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>The result is largely the same. </p>
  
  <p>Is there always a 100ms penalty for using jQuery? Is there something that I am missing? Thanks!</p>