I have a .NET 4.0 Client Profile, WPF + NHibernate 3 Line of Business style application, which I have almost completely developed. The backend database is a Microsoft Access file accessed via the NHibernate cont开发者_如何学运维rib JetDriver.
When running the application via the debugger in Visual Studio 2010, the application performance is very acceptable. If however I run either the Debug or Release .exe file or from a ClickOnce deployment, the performance of the whole application is extremely sluggish.
After searching on google, I found that disabling the 'visual studio hosting process' option would make my debugging experience similar to running the .exe file directly, which it did.
What I would like to know is, why is it I am experiencing such a slow down with respect to the normal debugging mode? And how can I improve matters at run time.
Compile Settings are as shown:
Regards,
NHibernate performance problems can often be attributed to log4net configuration. If you are using log4net and the level is set to DEBUG NHibernate will do a lot of logging. This may also be the reason that performance is acceptable in the the VS debugger but not deployment. log4net may not have write access to a folder in the deployment environment so it's failing to open the log file. See this link: http://jagregory.com/writings/empty-nhibernate-logs-and-poor-performance/.
PS - I'm having a hard time reconciling line-of-business application with Access back end.
精彩评论