[
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
|
Hi Mathew,
Thanks Mathew, I did read your article and was hoping
that there would be a sequel to the same with
AspectJ1.5.
The design is to log entry/exit
of selected few methods that would help record the application
footsteps. This would log to a circular buffer in the memory. This is a
flight recorder logging and is required to be on all the
time.
You are right sprinkling annotations all over the code
might turn out to be a maintenance nightmare, but the scope of our annotations
will be limited to certain classes and the idea here is that the developer
( end user) doesn't have to depend on whether we use AspectJ for our frame
work or just generate code using apt and
AnnotationProcessor.
Iam new to AspectJ and will dig
further into using pointcuts as opposed to annotations. But In my
design I need to decide whether I will be using plain Annotations with apt and
annotation processor or Aspect J and here the performance of the AspectJ during
runtime seemed to be of concern coz we will have to use reflection to log the
parameters.
Savita
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