We're using Spring (3.0.5) AOP with @AspectJ
style annotations and <aop:aspectj-autoproxy/>
. We use it for transactions, auditing, profiling etc. It works fine except that the startup time of the application is continuously growing as more code is being added.
I have done some profiling and found that most of the time is spent during Spring container initialization, more specifically org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(String, ObjectFactory)
- takes about 35 sec.
org.springframework.aop.support.AopUtils.canApply(Pointcut, Class, boolean)
- takes about 15 sec.
My goal is for the application to start in 5-10 seconds and not ~45 sec as it does now, so any tips would be much appreciated.