I realize it is static, but it is still 8.3 mb of overhead which I know 
doesn't sound like a lot but adds up with hundred of instances of 
applications using NHibernate.  

On Wednesday, December 19, 2012 2:35:01 PM UTC-6, TheCPUWizard wrote:
>
> The element is STATIC, so there is only one instance even if you have 
> thousands of users!
>
>  
>
> *From:* [email protected] <javascript:> [mailto:
> [email protected] <javascript:>] *On Behalf Of *David Cowan
> *Sent:* Tuesday, December 18, 2012 10:00 PM
> *To:* [email protected] <javascript:>
> *Subject:* [nhusers] Named Query Excessive Memory usage in HqlLexer
>
>  
>
> I found something interesting while profiling our application that I'm 
> hoping someone can explain. I noticed 8.3 MB of memory allocated to int16[] 
> arrays. Digging down further I found that these all originated in 
> NHibernate.Hql.Ast.ANTLR.HqlLexer for static readonly field 
> DFA23_transition. Here is the variable definition
>
>  
>
> static readonly short[][] DFA23_transition = 
> DFA.UnpackEncodedStringArray(DFA23_transitionS);
>
>  
>
> When setting a breakpoint on this the arrays first dimension is 346 and 
> the second dimension varies between 0 - 65526
>
>  
>
> Total memory usage for the array ends up being around 8.3 meg. I then 
> started looking at what causes this class to be used and narrowed it down 
> to a named queries. We only have one named query defined in our hbm.xml 
> files and if I remove that then I do not see this class get used. 
>
>  
>
> Can anyone explain what this is doing and why its using so much memory. 
> Our application is a web application and we have hundreds of instances 
> running. 8.3mb doesn't seem like much but it adds up quick with that many 
> instances.
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "nhusers" group.
> To view this discussion on the web visit 
> https://groups.google.com/d/msg/nhusers/-/lAjJ1_JOSosJ.
> To post to this group, send email to [email protected] <javascript:>
> .
> To unsubscribe from this group, send email to 
> [email protected] <javascript:>.
> For more options, visit this group at 
> http://groups.google.com/group/nhusers?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/nhusers/-/vdeCqIwKBvUJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to