NHibernate is very slow during debugging

Has anyone come across a problem when NHibernate is very slow in Visual Studio during debugging, but behaving normally when run separately? Logging is disabled, and time loss, apparently when executing real queries, NHProfiler shows that the queries were executed very quickly (on the SQL side, I suppose), 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 registration and start my application without Visual Studio, it will be an amount faster.

Update . After several hours of working on the problem, I was able to fix it by simply switching the project type from the Windows application to the console application (although this is actually a Windows service, but it always worked with the Windows Application project type before). What could be the reason that NHibernate stops in debug mode?

+3
source share
1 answer

I had the same problem with my WinForms application. I tried your suggestion to change it to a console application, and it worked! Unfortunately, the console window was unacceptable.

, . ShowSql() ( show_sql = true). , Visual Studio. , , VS , . Visual Studio, , .

, .

+3

Source: https://habr.com/ru/post/1745898/


All Articles