Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] compile time performance (Eclipse 3.3)

On Sat, Mar 21, 2009 at 3:06 PM, Oliver Böhm <boehm@xxxxxxxxxx> wrote:
> Hello,
>
> we use Eclipse 3.3 / ADJT 1.5.3 with Webtools in a project. We had big
> problem with one AspectJ lib (patterntesting-check). It has some general
> aspects which seems to slow down the compile time a lot. My questions:
>
> * Is the compile time performance of Eclipse 3.4 / AJDT 1.6.3 much better
> than with AJDT 1.5.3?
We have done a significant amount of work to ensure that incremental
compilations are fast.  You will likely see dramatic speedup for
simple edit-save-compile cycles on non-aspects in Eclipse.  And our
latest work on the dev builds of AJDT 1.6.5 go even further in this
direction.

However, overly generic aspects will still slow the compile down.
Steps to minimize this are:

1. Ensure that your aspects are properly scoped through the use of a
within() pointcut.
2. Instead of writing a generic aspect, write an abstract aspect, that
can be sub-classed for the specific situations you need it for.
3. However, neither of these will work for the situation where you are
using a third party aspect.  A proposed feature is to have the ability
for the aop.xml to control weaving scope in static situations.  This
feature would certainly help your situation.  Andy Clement can talk
more about this.

However, I am fairly certain that the problem you are running into is
that in 1.5.3, too many full builds were occurring when there are
aspects on the aspect path.

>
> * Are there any "best practices" or performance tips available how to use
> AspectJ?

I assume you are talking about compilation performance, not runtime
performance.  If so, see above, if not, then ask again.  :-)

>
> * Is it possible to profile the AspectJ compiler to see, which aspects slow
> down the compile time?

The best thing to do would be to look at the AJDT Event Trace view.
This view has all sorts of information about what the compiler is
doing and why it made certain decisions.  I strongly recommend moving
up to a newer version of AJDT.

Hope this helps,
--andrew


Back to the top