[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-dev] thisJoinPoint and if() Performance
|
Compile it with -XlazyTjp (which is soon to become default) and you will
see it compiles to:
invokestatic #66; //Method ajc$if_0:()Z
invokestatic #62; //Method aspectOf:()LX;
[...]
invokestatic #60; //Method
org/aspectj/runtime/reflect/Factory.makeJP:(Lorg/aspectj/lang/JoinPoint$StaticPart
;Ljava/lang/Object;Ljava/lang/Object;)Lorg/aspectj/lang/JoinPoint;
invokevirtual #64; //Method
ajc$before$X$1$681c4445:(Lorg/aspectj/lang/JoinPoint;)V
Andy.
Simon Heinzle
<simon.heinzle@ad
novum.ch> To
Sent by: AspectJ developer discussions
aspectj-dev-bounc <aspectj-dev@xxxxxxxxxxx>
es@xxxxxxxxxxx cc
Subject
10/05/2005 13:42 [aspectj-dev] thisJoinPoint and
if() Performance
Please respond to
AspectJ developer
discussions
<aspectj-dev@ecli
pse.org>
Hi all,
is there a reason why following pointcut & advice
before() : execution(* BlaBla.*(..)) && if (someCondition) {
JoinPoint jp = thisJoinPoint;
}
is translated (in bytecode) to something like:
[...]
invokestatic <org/aspectj/runtime/reflect/Factory.makeJP>
[...]
invokestatic <...$if_0>
Invoking ...$if_0 before getting the Joinpoint makes more sense in my
opinion and furthermore would increase performance (in case of
SomeCondition = false) dramatically.
Regards,
Simon
_______________________________________________
aspectj-dev mailing list
aspectj-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-dev