1

Closed

High memory usage

description

First, this is a great project. Thanks much.
 
I'm finding though that the memory demands are huge. From a profiler: 8 Meg of string memory, 1 Meg of byte[]. 5.5 meg for namespaces.
 
This is pushing my .net4 MVC3 app over the common limit for shared hosting of a number of hosting companies (unfortunately 98% of the memory space is being used by the libraries, not my object -- this being the only external library, the rest from MS).
 
Is there any way to reduce the memory footprint?
Closed Sep 3, 2012 at 5:18 PM by jwrosewell
See comments on forum.

comments

pkuykendall wrote Aug 28, 2012 at 10:17 PM

No need to reply here. Found your forums and added a comment to an existing thread on the same topic http://51degrees.mobi/Support/Forum/tabid/65/forumid/2/postid/1799/scope/posts/Default.aspx#1799 .

jwrosewell wrote Sep 3, 2012 at 5:16 PM

Here is the response from our forums.

"There is a constant called StoreSegmentResults in the DetectionConstants.cs class which could be set to false. This will reduce memory consumption slightly by not caching some of the matching data but will increase CPU usage marginally.

An alternative which may be less relevant in a shared hosting environment would be to use the C API. C enables the working data to be embedded into the compiled executable reducing the memory foot print, startup time, etc. However this solution is more technically complex than the NuGet install.

Our approach is to ensure the solution is both fast and accurate. We don't include data for devices which we've not seen in the past two years."