Use reflection optimization for CompentType.Equals

Description

While I was checking the performances of my web application using NHibernate, I wondered why 13% of CPU time was used by RuntimePropertyInfo.GetValue. It appears that this reflection method is used by ComponentType.Equals() (itself used by EntityKey.Equals()).

In the case of comparing composite ids, NHibernate just uses plain Reflection and this is a real performance issue in my case (use of BasicGetter.Get()). Can the reflection optimization be applied to the comparison of EntityKeys as well ?

Environment

None

Attachments

1
  • 04 Jun 2007, 01:22 AM

Activity

Show:

Former user November 13, 2007 at 2:27 AM

Thanks for the investigation!

Christophe Vigouroux November 13, 2007 at 2:06 AM

Problem was due to a bad hashcode implementation which lead to really tooooo much EntityKey.Equals() calls !

see https://nhibernate.jira.com/browse/NH-1199#icft=NH-1199

Bug to be closed...

Won't Fix

Details

Assignee

Reporter

Affects versions

Priority

Who's Looking?

Open Who's Looking?
Created June 4, 2007 at 1:22 AM
Updated June 30, 2008 at 6:59 AM
Resolved November 13, 2007 at 2:27 AM
Who's Looking?