I was wrong regarding the JoinPointGenerator unshared instances. As a matter of fact, they
are shared between the intance advisors and the class advisor.
What was happening was a a bug inserted during implementation of JBAOP-550:
http://jira.jboss.com/jira/browse/JBAOP-562
I'm about to commit the fix for JBAOP-562. However, the jboss messaging tests still
fail. What I am seeing here is 3418ms spent on 513 invocations to
JoinPointGenerator.generateJoinPointClass. Taking a deeper look, a 2898ms parcel of this
time is spent on the generation of 29 joinpoint classes. The rest is spent on retrieving
generated classes from the cache and calls to reload the generated class from the class
loader.
The time spent in the generation of joinpoint classes could be hardly be optimized, IMO.
1153ms are spent alone in 29 calls to
JoinPointGenerator.initialiseAdviceInfosAndAddFields, 741ms of which are spent in the
JoinPointGenerator.addAspectFieldAndGetter() method. The main overhead of this method is
in the call to CtNewMethod.make() method, of javassist (691ms). The 1153ms also include
199 ms spent on 66 calls to the AdviceMethodFactory.findAdviceMethod. I am not sure we can
optimize something inside it either (need to take a deeper look). Finally, there are 150
ms spent alone on the constructor of AdviceSetup. Most of the overhead of this constructor
lies in calls to ClassLoader.loadClass and to ReflectToJavassist.classToJavassist. The
rest of these 1153ms are micro seconds spent here and there with other operations.
Second in the overhead list of joinpoint classes generation are the 919ms spent on 29
invocations to JoinPointGenerator.createConstructors. Most of this overhead is caused by
the calls to CtNewConstructor.make javassist methods.
I wonder whether it is worth to optimize the joinpoint class generation, or if it would be
better to concentrate on turning the 513 invocations to
JoinPointGenerator.generateJoinPointClass into aprox 29 calls.
Any ideas?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4145838#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...