[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] Performance problem with @annotation(x) on field access
|
Hi,
Please raise a bugzilla for this improvement:
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=AspectJ
cheers,
Andy
On 2 September 2011 04:13, Maik Jablonski <maik.jablonski@xxxxxxxxx> wrote:
> Hi,
>
> some time ago there was a bug report about slow performance with
> @annotation on method level:
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=296484
>
> I want to report a similar issue with the @annotation on field access level.
>
> Using something like the following advice which captures the use of a
> @Bind-annotation on field set access results in poor performance:
>
> Object around(Object host, Bind bind, Object newGuest)
> : set(@Bind !java.util.Collection+ *.*)
> && this(host) && args(newGuest) && @annotation(bind)
> {
> // ...
> return proceed(host, bind, newGuest);
> }
>
> A workaround similar to the one descirbed in the bug reports performs
> much better:
>
> Object around(Object host, Object newGuest)
> : set(@Bind !java.util.Collection+ *.*)
> && this(host) && args(newGuest)
> {
> Bind bind = ((FieldSignature)
> thisJoinPointStaticPart.getSignature()).getField().getAnnotation(Bind.class);
> // ...
> return proceed(host, newGuest);
> }
>
> HTH, Maik
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>