Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Passing state between around advise

No. You are willing to trade something you have not tried and merely assume to be slow for something else you hope might be faster. You provide no code sample, no numerical performance test data or other context information which would help anyone here to offer better help. The one offered gets dismissed by you just like that. What else do you expect?

For what it is worth, if you want alternatives, here are two more of them, and they are not the last ones. Anyway:

1) You could easily do without recording the caller and just use indentation for the call hierarchy. This is what I do in my tracing classes.

2) Just give thisEnclosingJoinPointStaticPart a try. Might be just right for your special case.

Alexander Kriegisch

Am 23.11.2012 um 18:51 schrieb Brian Toal <brian.toal@xxxxxxxxx>:

In my case I'm willing to trade off clean code for performance.  Can you elaborate on the other options?

Thanks.

On Friday, November 23, 2012, Brian Toal wrote:
My concern with thread local is the cost of gets and puts.

I'm not sure If the per* solution will help as it would create a lot of garbage if aspect instances are generated at a high frequency.

On Friday, November 23, 2012, Brian Toal wrote:
I want to share contextual information between Around advice invocations for the same thread.  For example I'm interested in storing the signature from previous advice execution for the same thread so I can log caller method corresponding to the current callee.

I don't fully understand if the proceed API with arguments allows info to be exchanged between  subsequent advice calls or if its intent is to override the agreements passed to the point cut?

The other option potentially i would need to maintain a aspect instance per thread and could have a member that contained the previous signature.

Looking for suggestions on how to accomplish this.

Thanks.


_______________________________________________ 
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Back to the top