Are there ways to improve NHibernate's performance regarding entity instantiation?

Posted by denny_ch on Stack Overflow See other posts from Stack Overflow or by denny_ch
Published on 2010-05-12T12:51:08Z Indexed on 2010/05/12 13:04 UTC
Read the original article Hit count: 253

Filed under:
|
|

Hi folks,

while profiling NHibernate with NHProf I noticed that a lot of time is spend for entity building or at least spend outside the query duration (database roundtrip). The project I'm currently working on prefetches some static data (which goes into the 2nd level cache) at application start. There are about 3000 rows in the result set (and maybe 30 columns) that is queried in 75 ms. The overall duration observed by NHProf is about 13 SECONDS! Is this typical beheviour? I know that NHibernate shouldn't be used for bulk operations, but I didn't thought that entity instantiation would be so expensive.

Are there ways to improve performance in such situations or do I have to live with it?

Thx, denny_ch

© Stack Overflow or respective owner

Related posts about nhibernate

Related posts about Performance