ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sikha, Naresh" <>
Subject RE: Cutting Ant overhead (was "Could Ant build scripts be compile d?")
Date Tue, 25 Nov 2003 20:11:00 GMT

I brainstormed this spaced and dubbed it the 'Console IDE'. AntShell (antsh)
is also a start at this .....


-Naresh Sikha

-----Original Message-----
From: Rich Wagner []
Sent: Tuesday, November 25, 2003 11:44 AM
Subject: Cutting Ant overhead (was "Could Ant build scripts be

Well, not to discourage anyone from actually implementing a compiler, if 
they so desire...

Maybe concentrating on the 80/20 rule-of-thumb is best first.  I mean, yes, 
compiled Ant code would no doubt be fastest (theoretically), but...

What if an Ant front-end existed which did two things...  First, the 
front-end would be Java-based, have either a GUI or a simple stdin-based 
command interpreter.  But most importantly, the front-end would NOT quit (a 
la "System.exit") after one Ant invocation and before the next Ant 
invocation.  For instance, the front-end could call Ant's "main" directly, 
instead of spawning a new sub-process for each "Ant" invocation.   (Calls to

System.exit in Ant would need to be "caught", e.g. via a SecurityManager 

What does that buy ?  Well, you then incur JVM (and a LOT of class-loading) 
start-up costs only once, instead of once PER Ant invocation.

Secondly, and going one step farther...  Instead of the front-end calling 
Ant's "main" method, the front-end could potentially use a modified version 
of that "main" method's code -- specifically an implementation which uses 
cached XML Dom trees which correspond to formerly read and parsed Ant build 
files.  Doing so would again replace the once-per-Ant-invocation XML parsing

cost with a once-per-buildfile parsing cost.

Again, these things would fall short of what a compiler could do (though the

compiled code should ideally avoid the JVM-startup per Ant invocation cost, 
right ?).

Just some thoughts...

Rich Wagner

> >From: Stirling, Scott []
> >Subject: Could Ant build scripts be compiled?
> >
> >Hi,
> >
> >Just a thought I've been holding onto for a while.
> >
> >Could we benefit from compiling Ant build scripts?  They would
> >load faster if the XML didn't have to be parsed.  They would
> >be less open to unwanted modification (if you ship build
> >scripts with a product, for example).  They might run faster,
> >although I'm not as sure about that.
> >
> >What would they be compiled down to?  I guess the best answer
> >would be, a Java class.  Ant would have to be able to load a
> >class rather than a build script for this to work.
> >
> >Any thoughts?
> >
> >Scott Stirling
> >Workscape, Inc.

Say "goodbye" to busy signals and slow downloads with a high-speed Internet 
connection! Prices start at less than $1 a day average. (Prices may vary by service area.)

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message