title: MVC4 RC script bundling very slow
body: <p>I upgraded a large project to MVC4 RC today to try out the bundling and minification.</p>
  
  <p>Before I had 8 static js files in script src tags in a partial view. A sample page ran in under .1 seconds consistently.</p>
  
  <p>I added a bundle like this:</p>
  
  <pre><code>    bundles.Add(New ScriptBundle("~/bundles/mybundle").Include(
                  "~/Resources/Core/Javascripts/jquery-1.7.1.min.js",
                  "~/Resources/Core/Javascripts/jquery-ui-1.8.16.min.js",
                  "~/Resources/Core/Javascripts/jquery.validate.min.js",
                  "~/Resources/Core/Javascripts/jquery.validate.unobtrusive.min.js",
                  "~/Resources/Core/Javascripts/jquery.unobtrusive-ajax.min.js",
                  "~/Resources/Core/Javascripts/bootstrap.min.js",
                  "~/Resources/Core/Javascripts/toolbar.js",
                  "~/Resources/Core/Javascripts/jquery-ui-timepicker-addon.js"))
  </code></pre>
  
  <p>In the partial I added this and the page load time increased to .5 seconds consistently with compilation debug as true and as false. 
      @Scripts.Render("~/bundles/mybundle")</p>
  
  <p>I then wrapped it with miniprofiler like this:</p>
  
  <pre><code> Dim profiler = MiniProfiler.Current
   Using profiler.Step("bundling")   
         @Scripts.Render("~/bundles/mybundle")
   End Using
  </code></pre>
  
  <p>The bundling step takes .4 seconds consistently. </p>
  
  <p>The computer is a running VS2010 on modern hardware with a high end SSD drive and no nonstandard background tasks running. As soon as I delete the @scripts.render the page load time drops again to .1 seconds.</p>
  
  <p>Is there a way to make the bundler cache or am I missing something that is making it be this slow?</p>