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].
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