Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] Reg: Using around advice in cflowbelow pointcut with LTW

 A typo ,  the if condition in second case wont be there as well as i removed the context

thanks
Laks

On Mon, Dec 21, 2009 at 11:21 PM, Lakshminarayanan Seshadri <lnarayanan.seshadri@xxxxxxxxx> wrote:
Hi Andy

  Thanks for your reply.
  pointcutA is a  execution pointcut for a top level doFilter method in appl. class/type.

  I tried initially with a binding context where my pointcut A looked like:

pointcut A(TypeB request) : execution(* com.abc.TopA.doFilter(..)) && args(request,..) && if (condition/_expression_ on the request...)

pointcut InterestedMethods :  cflowbelow(pointcutA ) && execution(* *(..)) && (within(com.abc..*) && !within(thisAspect)

And then i removed the context i.e request and tried as:

pointcut A : execution(* com.abc.TopA.doFilter(..))  && if (condition/_expression_ on the request...)

pointcut InterestedMethods :  cflowbelow(pointcutA ) && execution(* *(..)) && (within(com.abc..*) && !within(thisAspect)


In both cases in the by default issingleton aspect i had an around advice on the cflowbelow pointcut InterestedMethods.

I would certainly try the timers and check this. My overhead was on application startup and i couldnt get my application started for more than 20min.

Thanks and regards
Laks


 

On Mon, Dec 21, 2009 at 9:42 PM, Andy Clement <andrew.clement@xxxxxxxxx> wrote:
Hi Laks,

You could try the new pointcut match timers for LTW to see if the
components of the pointcuts are proving expensive to match.

http://andrewclement.blogspot.com/2009/11/aspectj-profiling-pointcut-matching.html

That would at least tell us if there is excess time spent in matching
for one of the constructs.  You also don't say what pointcutA is?

If you are not binding context in the cflowbelow (and it doesn't look
like you are), the generated code should be pretty quick.  I guess I'm
saying at the moment I don't know if your overhead is the activity of
matching/weaving or the actual running of the result.  Which do you
think it might be?

If you run the timers and observe something expensive, we can see
about optimizing/rewriting that component.

cheers,
Andy

2009/12/21 Lakshminarayanan Seshadri <lnarayanan.seshadri@xxxxxxxxx>:
> Hi
>   Can anyone let me know if below pointcut is safe in terms of performance,
>
>      pointcut InterestedMethods :  cflowbelow(pointcutA ) && execution(*
> *(..)) && (within(com.abc..*) && !within(thisAspect)
>
> Here pointcutA is execution on a particular top level method call.
>
> And i intend to have a around advice on above InterestedMethods pointcut in
> a default issingleton aspect.
>
>
> I see a significant overhead in startup with LTW and i wonder i am doing
> anything grossly wrong/missing something
>
>
> Thanks in advance
> Regards
> Laks
>
> _______________________________________________
> aspectj-dev mailing list
> aspectj-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-dev
>
>
_______________________________________________
aspectj-dev mailing list
aspectj-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-dev



Back to the top