We recently raised a performance issue by highlighting something I need to confirm.
When you include a kit like this:
@Scripts.Render("~/jquery)
It seems to work (identified by dotTrace and sees how it goes through this):
Microsoft.Ajax.Utilities.MinifyJavascript()
for each individual request, both on the page with it turned on and on the call to the script itself.
I appreciate that in a real-world script there will only be 1 hit on the script, as the client will cache it. however, it appears to be ineffective.
The question is whether this is the expected behavior, as if it werenβt, I would like to fix it (so any suggestions), but if so, we can minimize the scenarios beforehand.
UPDATE
So, even if I changed the compilation mode for debugging, it still runs the minify method. It prints out individual URLs, but still tries to minimize it.
However, if you remove all references to rendering methods, it does not try to pervert anything and works quickly, does not inflate the application pool and does not maximize the processor on the web server.
source share