This project is read-only.
5
Vote

Abnormal memory usage (+200MB)

description

We have an ASP.NET MVC4 application that is using System.Web.Optimization to bundle a bunch of Scripts (JQuery, Kendo, Bootstrap). In essence, we have 2 Script Bundles and 2 Style Bundles. Most of them are already minified.

When starting our application, this results in the following Memory Allocations (only relevant Hot path shown):
Function Name Number of Calls Inclusive Allocations Exclusive Allocations Inclusive Bytes Exclusive Bytes Module Name
System.Web.Optimization.Scripts.Render(string[]) 4 5,518,926 5,518,926 217,531,436 217,531,436 System.Web.Optimization.dll
System.Web.Optimization.Styles.Render(string[]) 4 2,059,042 2,059,042 47,376,570 47,376,570 System.Web.Optimization.dll

Changing the value of BundleTable.EnableOptimizations does not make any difference.

Note: this is taking 200+MB for Scripts and ~ 50MB for Styles, we have about 7 MB of scripts and ~3MB of css, most is already minified.

comments

farrukhsubhani wrote Aug 18, 2016 at 7:23 PM

I have done this test today and included jquery only with 2 custom script files and in debug mode it works fine but in live it starts giving out of memory errors.