MVC4 RC script binds very slowly

Today I upgraded a large project for MVC4 RC to try to combine and minimize.

I used to have 8 static js files in src script tags in a partial view. A sample page was run under .1 second sequentially.

I added the following set:

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")) 

In partial I added this, and the page load time increased to 0.5 s sequentially with debugging the compilation as true and false. @ Scripts.Render ("~ / bundles / mybundle")

Then I wrapped it in a mini profile as follows:

  Dim profiler = MiniProfiler.Current Using profiler.Step("bundling") @Scripts.Render("~/bundles/mybundle") End Using 

The binding step takes 0.4 seconds.

The computer runs on VS2010 on modern equipment with an SSD hard drive and non-standard background tasks do not work. As soon as I delete @ scripts.render, the page load time will again drop to 0.1 seconds.

Is there a way to make the compiler cache, or am I missing something that makes it slow?

+10
asp.net-mvc-4
Jun 12 2018-12-12T00:
source share
1 answer

This is a known bundle bug in ASP.NET MVC 4 RC. The combination is not cached on the server side.

The error is described in detail here: http://todd-carter.com/post/2012/06/10/mini-me-fication-in-system-web-optimization-rc-is-evil/

There should be an update to the nuget MVC 4 RC package for the week ending June 17, 2012. (Source: https://twitter.com/howard_dierking/status/212725872904507392 )

+8
Jun 13 '12 at 2:15
source share



All Articles