1
votes

As suggested by many, logging is better managed through AOP, and in my case, using Castle Windsor interceptors.

I am currently developing a web app and we just added an interceptor to log every method that is called (the methods are tagged by a custom attribute therefore I can choose the method I want to log). When I test the web app the performance is awful. Sometimes it might take up to 10 seconds for a page to render. Without the interceptor the pages load instantly.

Are there any tips when adding interceptors and performance or is it actually this slow?

1
Proper implementation of logging interceptors has no noticeable impact on performance. Post your code.Mauricio Scheffer
thanks...i found the issue and it has to do with NH ProfilerEvangelos Skianis

1 Answers

1
votes

Found the solution. I executed my test cases and the performance difference was minor with the interceptors enabled. I checked my log4net configuration and I saw that I had NH Profiler enabled. I removed the profiler and the performance sky rocketed. It seems that there is something strange going on when the profiler is working.

Just to make sure my case is fine, I enabled ATM with profiler on/off. When the profiler was on the performance degradation was HUGE. When the profiler was off everything was fine.