[Prev] Thread [Next]  |  [Prev] Date [Next]

[NHibernate-development] Performance issues Dmitry Berkovich Tue Jun 05 18:01:03 2007

  I finally classified a one of performance problems that I wrote
yesterday. It's about code generation of getter/setter methods.
  Current implementation of "NHibernate.Persister.Entity.
AbstractEntityPersister" use optimizer for get/set values when global
flag [Environment.UseReflectionOptimizer] is turned on. But it not use
optimizer set for identifier member, because IAccessOptimizer  not
export SetValue method. The another problem that NHibernate.Bytecode.
IBytecodeProvider.GetReflectionOptimizer method receive array of
setters/getters that not include identifier getter/setter.

I my project where I going to use NHibernate performance is very
important and I am going to work with large sets of data.About 150,000
object in one session. So NHibernate spend about 30% of time in setter
of identifier that use regular (slow) reflection when it load objects
to memory.
  To improve this performance issue IBytecodeProvider,
IReflectionOptimizer  interface must be broken for adding identifier
setter/getter object. NHibernate.Persister.Entity.
AbstractEntityPersister.SetIdentifier method also need to be changed
to use optimizer setter if need.
I am going to break this interface in my local version today, but I
will pref are that this feature will be added to the next version.

This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
Nhibernate-development mailing list