[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] AspectJ 1.5 runtime and compile time Performance
|
In the past we have done a lot of performance
measurement (http://ducati.doc.ntu.ac.uk/uksim/journal/Vol-6/No.3-4/CRC-Dalton.pdf),
especially for a logging aspect because of the scope of interaction with
the application, which have resulted in implementation improvements and
new compiler features e.g. -XlazyTjp. Unfortunately this work has not been
updated for AspectJ 1.5 but there shouldn't have been any substantial change
in performance in this particular area. However, there have been improvements
to the AspectJ runtime WRT heap usage which may have a knock-on effect
indirectly through reduced GC.
In my experience logging (by which I
mean recording or tracing entry and exit, optionally with arguments, for
a large proportion of methods in a large proportion of classes in an application)
is disabled for 99% of the time. This is because the pathlength of recording
the information to disk or even memory in text or binary form has an unacceptable
impact on overall application throughput and is reserved for problem diagnosis.
It is therefore the performance of the system with logging disabled that
is important. A well designed logging aspect should not need to use reflection:
using thisJoinPoint and thisJoinPointStaticPart do not. Please see Chapter
11 of "Eclipse AspectJ" for an example of best practice.
I'd like to ask some questions about
your design. How do you propose to use annotations? Annotating a large
proportion of the methods in your system will create a new maintenance
problem: much better to use a traditional pointcut that matches using
types and method names while perhaps excluding certain frequently called
methods, that will flood the log with superfluous information, using an
annotation that is used at weave- not run-time.
A well written logging aspect should
have similar performance characteristics to a hand written equivalent but
be less invasive, more flexible and guaranteed to produce correct data.
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/
"Chandan, Savita"
<Savita.Chandan@xxxxxxxxxxxxxx>
Sent by: aspectj-users-bounces@xxxxxxxxxxx
04/08/2006 20:49
Please respond to
aspectj-users@xxxxxxxxxxx |
|
To
| <aspectj-users@xxxxxxxxxxx>
|
cc
|
|
Subject
| [aspectj-users] AspectJ 1.5 runtime
and compile time Performance |
|
Hi All,
Iam looking into a design where one of the
options is to use AspectJ with Annotations for adding a logging concern.
The concern I have is regarding the runtime performance hit this would
have due to the usage of reflection in the aspects. The requirement of
my design is to log the parameters as well as the annotated method and
the class it belongs to. There would be restrictions on how many parameters
would be logged and stuff.
Does anybody have any links to the benchmarking
data on Java1.5, Windows OS, using AspetcJ1.5?
Thanks,
sc
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users