User development,

A new message was posted in the thread "ClassPool Refactoring":

http://community.jboss.org/message/518925#518925

Author  : Kabir Khan
Profile : http://community.jboss.org/people/[email protected]

Message:
--------------------------------------------------------------
> alesj wrote:
>  
> > Finally, I detected a great deal of calls to 
> > ClassPool.get("org.jboss.aop.microcontainer.annotations.DisableAOP"). The 
> > calls are being made by 
> > org.jboss.annotation.factory.javassist.DefaultValueAnnotationValidator.getDeclaredMethods(Class<?>),
> >  and I'm confident that this can be improved somehow (such as caching 
> > DisableAOP ctClass). I think improving this will have some impact on the 
> > startup time of AS.
> We're deprecating this annotation anyway.
> But we're replacing it with just the opposite - EnableAOP, so not a lot 
> different from performance perspective.
> Kabir, any idea on how to optimize (e.g. cache) this?
 
The quick and dirty way would be at DefaulValueAnnotationValidator level
-a WeakHashMap<Class<?>, CtClass>, or
-be able to configure it with annotations it should cache
 
But I guess the real and harder solution is that caching at class pool level 
could be improved? What seems to happen now is that when trying to load a 
CtClass we end up in Base-/JBossClClassPoolDomain which checks each relavant 
pool and parent domain for a locally cached CtClass which is simple but 
probably more work than necessary. Maybe these lookups should be cached in the 
initiating pool, with some invalidation if the domain (or its parent domain) 
has pools added/removed?

--------------------------------------------------------------

To reply to this message visit the message page: 
http://community.jboss.org/message/518925#518925


_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to