Skip to main content

[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

Title: AspectJ 1.5 runtime and compile time Performance
Thanks Wes. We are trying to see if we can push a whole bunch of this to compile time. In the sense, Iam trying to see if I can find a way to generate logging code at compile time so that we do not take a runtime hit with reflection, because the nature of the logger is that of a flight recorder and will be on all the time.
 
Does AspectJ provide anything like Annotation Processors and apt tools that will let us generate code on the fly before the weaving happens?
 
Also queuing the logging work on a different thread is a good idea. Hadn't thought of that.
 
Thanks,
Savita


From: aspectj-users-bounces@xxxxxxxxxxx [mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Wes
Sent: Saturday, August 05, 2006 12:25 PM
To: aspectj-users@xxxxxxxxxxx
Subject: Re: [aspectj-users] AspectJ 1.5 runtime and compile time Performance

Hi -
 
Sorry, I don't have numbers at hand.
 
Performance should be the same or better than a hand-coded version of the same functionality:
 
 
But I'd recommend you profile your application yourself because there can be significant differences in the way things are coded, and sometimes classes are loaded/needed earlier than they would be otherwise.  Java Reflection has become much faster of late, but String munging (poorly done) often comprises most of the cost of logging in any implementation.  (And of course you can queue the logging work in another thread.)  So for design purposes, you can be secure in knowing it's not worse than hand-coding, but in engineering you might still need to experiment to get the best performance.  (The experiments will be a million times easier than if you had to change a whole lot of hand-written logging code.)
 
hth -
Wes
 
------------Original Message------------
From: "Chandan, Savita" <Savita.Chandan@xxxxxxxxxxxxxx>
To: aspectj-users@xxxxxxxxxxx
Date: Fri, Aug-4-2006 12:49 PM
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

Back to the top