Quantcast
Channel: ajaxmin Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 683

Commented Issue: Memory Leak [19529]

$
0
0
So I have this project where I match via Regex all the scripts in the page, combine them into only one script that sends all scripts names to a handler.

In the handler, I load all scripts and minify them using AjaxMin, cache the result and output to the user. This lib is using almost 1GB of memory. I used .NET memory profiler and found a memory leak problem. The image with the results is attached.
Comments: ** Comment from web user: ronlo **

No, I haven't had a chance to work on this yet. So how are you using the objects? Are you caching a JSParser object or creating a new one every time? From the image, it looks like it's the scopes that are leaking -- scopes contain collections for the fields defined and referenced within them, and each field points to the lookup and vardecl nodes corresponding to the references/definitions. Those types of objects seem to be at the top of the list. The parser holds a reference to the global scope, so we need to make sure it gets cleared. Of course, each AST node references the parser so it can access the settings, so I wonder if there is a circular reference going on there.

Anyhow, I'll try to set up a process that just keeps minifying code over and over and see what leaks.


Viewing all articles
Browse latest Browse all 683

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>