Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Re: AspectJ Performance (Abel Perez)



Abel,

Of course it depends what you are doing. Because the AspectJ 1.1 compiler
is based on the JDT in Eclipse and all Java compilers endeavour to generate
exactly the same byte-code for a given piece of source anyway (due to
presumptions made by JIT compilers) if you switch from using javac to ajc
for your existing program you should see no change in performance. When you
start to add aspects things change. However when you look more closely the
only difference from a performance perspective between an AO program and
its hand-coded equivalent is the "glue" or weave generated by AspectJ; your
base program remains the same and so does the implementation of the cross
cutting concern e.g. security authentication, it's just the way one calls
the other that's different. Measurements we have made show that in all but
the most pervasive concerns such as logging there is little or no
difference in either throughput or scalability between an AO implementation
and its hand-coded equivalent. Care must be taken however when using the
reflective API thisJoinPoint.

I suggest taking implementation advice from examples to be found both
online and in the books that have been published on AspectJ.

Matthew Webster
AOSD Project
Java Technology Centre, MP146
IBM Hursley Park, Winchester,  SO21 2JN, England
Telephone: +44 196 2816139 (external) 246139 (internal)
Email: Matthew Webster/UK/IBM @ IBMGB, matthew_webster@xxxxxxxxxx
http://w3.hursley.ibm.com/~websterm/



Back to the top