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)

Hi Andrew,

as I wrote to Andy an update to Eclipse 3.4 would hopefully solve our problem. The AJDT trace is helpful but it is difficult to find the "bad" aspects.

Since we have the aspect lib under our control I will take a look into it and follow your advice to use within() for the right scope. Also the tip with the abstract aspects can help us because each aspect is already divided into a concrete and an abstract part. Perhaps we will extract the concrete part into a separate jar.

regards
Oliver



Andrew Eisenberg schrieb:
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
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users

--
Oliver Böhm
http://www.javatux.de


Back to the top