NHibernate very slow during debugging

Posted by HeavyWave on Stack Overflow See other posts from Stack Overflow or by HeavyWave
Published on 2010-05-17T23:40:42Z Indexed on 2010/05/19 6:50 UTC
Read the original article Hit count: 257

Filed under:

Have anyone stumbled upon a problem where NHibernate is extremely slow in Visual Studio while debugging, but behaves normally when run separately? Logging is disabled and the time lost seems to be when the actual queries are executed, NHProfiler shows that queries were executed very quickly (on SQL side I presume), but each session with 10 queries takes about 4 seconds. I am using SQL Express Server. As I said, even if I turn on full logging and run my application without Visual Studio it is a magnitude faster.

Update. After hours and hours of work towards the issue I was able to fix it by simply switching project type from Windows Application to Console Application (although in reality it's a Windows Service, but it always worked before with Windows Application project type). What could possibly be the difference to bring NHibernate to a halt in debugging mode?

© Stack Overflow or respective owner

Related posts about nhibernate