Performance with Castle Windsor Interceptors

1.2k views Asked by At

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

There are 1 answers

0
Evangelos Skianis On

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.