|
From: Rod J. <rod...@in...> - 2003-12-07 10:25:18
|
I've just checked in a simple "cflow"-style method matcher pointcut, that enables us to apply simple conditions such as "this call came from com.my.web.MyController class", or perhaps a particular method of such a class. It's 10-15 times slower to evaluate such a pointcut than a "normal" method matcher, because it's necessary to construct a new Throwable to analyse the stack trace (unless someone has a better idea!). However, it's still not *that* slow, and the cost wouldn't matter that much if it were done once per business invocation (my machine can do 4-5K complete invocations involving such evaluation per second, even running under a profiler). The performance issues can also be greatly reduced in composition with other pointcuts, assuming common sense is used with ordering. So if we want to advice "setter methods where the call came from wherever" the slow evaluation happens more rarely. See org.springframework.aop.support.ControlFlowPointcut. If you think this functionality is worthwhile, please try it out and--better still--help to improve it, as I don't have much more time for it. (It's pretty basic right now.) Regards, Rod |