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?
asp.net-mvc-4
ericdc Jun 12 2018-12-12T00: 00Z
source share