Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] incrimental compilation

Mik,

Here are the considerations why we would like to have iajc to behave more
like javac task.

1. Our project is very big (3500 files which makes ~4000 classes).
This require at least 512MB memory to be allocated to ANT when doing
iajc to complete successfully. In idle mode this is the memory that
constantly in use.
Our developers usually have other memory consuming tasks going on, e.g.
running App server (which takes up to 512MB as well) along with debugging
via
IDE which also takes up to ~348MB. Have another idling process taking 512MB
is not acceptable for our development cycle.
Anticipating question like: "why do you need to run all of your classes
through AspectJ?" I'd like to note,
that we use aspects to find certain calls in about 50%-70% of our classes.
2. We use IDE that has tight integration with ANT. Our developers use ANT
via
this IDE and there is no way for them to even "press 'r' to rebuild" since
this is not
an interactive process.
3. It would be really nice to have file/directory inclusion/exclusion
mechanism to be more
flexible in iajc. Right now if incremental compilation is used the
sourceroot has to be used
and there is no way to exclude some subdirectories.

Thank you,
Peter

----- Original Message ----- 
From: "Mik Kersten" <beatmik@xxxxxxxxx>
To: <aspectj-dev@xxxxxxxxxxx>
Sent: Friday, January 16, 2004 1:04 AM
Subject: RE: [aspectj-dev] incrimental compilation


> Nick,
>
> Wes gives some great pointers below.  I'm wondering if there's something
> fundamental about your build process that prevents you from keeping the
Ant
> script running in order to use the incremental building.  Making iajc
behave
> more similarly to javac might be possible if we externalized the last
> compile's dependency structure and some other state currently kept
> in-memory.  I can't recall us considering that, and it could be a fair
> amount of work.  So we need to better understand the limitations the
current
> modes impose.  I imagine that you're not the only one affected by
> difficulties in substituting ajc for javac, so please keep us informed of
> your experiences.
>
> Thanks,
>
> Mik
>
> > -----Original Message-----
> > From: aspectj-dev-admin@xxxxxxxxxxx
[mailto:aspectj-dev-admin@xxxxxxxxxxx]
> > On Behalf Of Wes Isberg
> > Sent: Thursday, January 15, 2004 6:50 PM
> > To: aspectj-dev@xxxxxxxxxxx
> > Subject: Re: [aspectj-dev] incrimental compilation
> >
> > Faster compiles, from incremental builds or ...
> >
> > Maybe use -outjar to output the incremental compile.  Then
> > whenever that jar file is updated, run the subsequent builds.
> >
> > Or, AjcTask.doCompletionTasks() uses ajc.Main.setCompletionRunner()
> > to get notice of completion, so you could do something similar
> > with your own ajc.Main.main(..) driver outside of Ant.
> >
> > And in either case you can define a message handler so they go
> > to you rather than System.[out|err].
> >
> > Perhaps more importantly, look at your pointcuts and such to
> > see if you are asking the compiler to to unnecessary work.
> > Try (when correct) to use && within() or && withincode() to provide
> > a fastmatch to avoid munging where it is not needed. For
> > more information on that, see section 7 in Erik/Jim's paper
> >
> >    http://hugunin.net/papers/aosd-2004-fixedSubmission.pdf
> >
> > A more modular build - compile each module, compile aspects to
> > binary, weave each module - might also help.
> >
> > Performance is one aim of 1.2, so relief is on the horizon,
> > but AFAIK there are no huge performance optimizations in
> > the tree now.
> >
> > Wes
> >
> > Nicholas Lesiecki wrote:
> >
> > > Ok, admittedly iajc will not (in 1.1) behave like javac.
> > >
> > > Does anyone have any good examples of how to recreate the desired
> > behavior
> > > (fast compiles)? In other words, do you launch one ant script and
leave
> > it
> > > idling while launching another to do post-processing, packaging, and
> > > deployment? How does the second script know when the first is done
with
> > an
> > > incremental compile? Has anyone done this and relied upon it for their
> > main
> > > build?
> > >
> > > The reason I'm asking: VMS (my company) just introduced AspectJ to the
> > > project this week and the main complaint is slow incremental compiles
> > during
> > > the compile-deploy-test cycle.
> > >
> > > If we manage to figure it out before someone assists, I'll post the
> > solution
> > > here.
> > >
> > > Cheers,
> > > Nick
> > >
> > > On 1/15/04 1:56 PM, "Wes Isberg" <wes@xxxxxxxxxxxxxx> wrote:
> > >
> > >
> > >>The AspectJ compiler does not support a mode like the
> > >>Javac Ant task where the set of input files are pruned to
> > >>remove files that haven't changed since a corresponding
> > >>.class file changed.  That can produce incorrect file
> > >>sets even for Javac, and AspectJ always needs to know
> > >>precisely which files it is supposed to be compiling,
> > >>since aspects potentially affect any class.  (This is
> > >>covered in the AspectJ FAQ.)
> > >>
> > >>You have another option:  Use the Ant task "tagfile" option,
> > >>and modify the tagfile whenever you want to kick off another
> > >>incremental build.  This will leave the compiler
> > >>"idling", but that's the only way to make us of
> > >>the in-memory cache for incremental compilation.
> > >>
> > >>See the ant task docs for more details.
> > >>
> > >>http://dev.eclipse.org/viewcvs/indextech.cgi/~checkout~/aspectj-
> > home/doc/devgu
> > >>ide/antTasks.html
> > >>
> > >>Wes
> > >>
> > >>Peter Litvak wrote:
> > >>
> > >>
> > >>>Hi,
> > >>>
> > >>>
> > >>>
> > >>>Is there any way to get an incremental compilation with AspectJ
> > compiler
> > >>>using ANT task? The incremental mode that described in the
> > documentation is
> > >>>not what I need. In that mode you have to run your build script and
> > then
> > >>>after full compilation is done the compiler is sitting there and
> > waiting
> > >>>until you press 'r' to rebuild (then it rebuilds only changed files)
or
> > 'q'
> > >>>to quit. This is so called "online" mode. Where I need an "offline"
> > mode
> > >>>because I use ANT build script from an IDE other than Eclipse and I
> > cannot
> > >>>have the compiler to idle.
> > >>>
> > >>>Basically I want to make AspectJ Ant task to behave pretty much like
> > regular
> > >>>javac task.
> > >>>
> > >>>
> > >>>
> > >>>Any suggestions?
> > >>>
> > >>>Thank you,
> > >>>Peter
> > >>
> > >>_______________________________________________
> > >>aspectj-dev mailing list
> > >>aspectj-dev@xxxxxxxxxxx
> > >>http://dev.eclipse.org/mailman/listinfo/aspectj-dev
> > >
> > >
> >
> > _______________________________________________
> > aspectj-dev mailing list
> > aspectj-dev@xxxxxxxxxxx
> > http://dev.eclipse.org/mailman/listinfo/aspectj-dev
>
> _______________________________________________
> aspectj-dev mailing list
> aspectj-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/aspectj-dev
>


Back to the top