You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Diane Holt <ho...@yahoo.com> on 2000/09/09 22:26:54 UTC

Still trying to figure out Ant's time issues

Given the following output:

[binky] ant
Buildfile: build.xml
init:
    [mkdir] Created dir: D:\dianeh\src\main\classes
keystone:
    [javac] Compiling 2 source files to D:\dianeh\src\main\classes
initcompile1:
    [javac] Compiling 1 source files to D:\dianeh\src\main\classes
initcompile2:
    [javac] Compiling 1 source files to D:\dianeh\src\main\classes
initcompile3:
    [javac] Compiling 2 source files to D:\dianeh\src\main\classes
initcompile4:
    [javac] Compiling 1 source files to D:\dianeh\src\main\classes
all:
BUILD SUCCESSFUL
Total time: 1 minutes 36 seconds

(Note: In reality, the compiler cranked out 773 classfiles.)

[binky] ant
Buildfile: build.xml
init:
keystone:
initcompile1:
initcompile2:
initcompile3:
initcompile4:
all:
BUILD SUCCESSFUL
Total time: 1 minutes 1 seconds
                    ^         ^
(BTW: Anyone want to fix this in DefaultLogger.java?)

If I drive the same compiles (scratch) thru a shell-script, it takes jikes
19.08 seconds. If I re-run the shell-script, jikes does recompile the
files in the list (the original 7), but not the other 765, and it takes
3.94 seconds.

So I feel I need to ask again -- could it be the way I'm doing my
build.xml file that's slowing things down? Is it just that Java programs
in general are slow? Could it be the timestamp-checking Ant is doing --
and if it is, could we add an attribute to the javac task to turn it off
(e.g., timecheck="false") so it just hands the files from the target over
to the compiler to let it decide?

If it could be my build.xml file, then could anyone offer me any pointers
how to better deal with what I need to do?  I realize Barrie Treloar
thinks I should be able to just say "javac *.java", but I don't happen to
have that ideal of a situation. I have build-order issues -- I need to get
certain files built up-front, before I can eventually get to a point where
I can then hand off all the rest of the files that use a generic
classpath. The files I need to build up-front use different classpaths, so
I can't even hand all of them off in just one target. I've scrunched it
down to 5 initial targets (to start with -- I have others I'll need to
deal with next, before I can finally get to the rest-of-the-files target),
and I don't see any way to not have those separate targets. Could that be
where the time is getting taken up -- Ant having to deal with those
separate targets?

I realize that in the larger scheme of things, waiting 1 minute isn't that
big of a deal -- but when you're dealing with something that you know can
get done in 4 seconds (and when you're waiting on a computer to complete
something), 1 minute seems awfully slow.

Sorry if I'm being a bit too "mortal". (BTW: What happened to that
Documentation for Mortals someone was working on? -- I think I could
really use it).

Thanks in advance for any insight anyone can offer,
Diane


=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/

Re: Still trying to figure out Ant's time issues

Posted by Peter Donald <do...@mad.scientist.com>.
At 01:26  9/9/00 -0700, you wrote:
>So I feel I need to ask again -- could it be the way I'm doing my
>build.xml file that's slowing things down? 

yep - probably - unless of course it is filesystem (is it mounted on NFS or
Samba ????)

>If it could be my build.xml file, then could anyone offer me any pointers
>how to better deal with what I need to do?  I realize Barrie Treloar
>thinks I should be able to just say "javac *.java", but I don't happen to
>have that ideal of a situation. I have build-order issues -- I need to get
>certain files built up-front, 

The question is why ? Build order should never be a problem unles built
files are incompatable or use incompatible classpaths. Is this the case ?
Otherwise there *should* be no such thing as ordering as the compiler will
take care of it.

>I realize that in the larger scheme of things, waiting 1 minute isn't that
>big of a deal -- but when you're dealing with something that you know can
>get done in 4 seconds (and when you're waiting on a computer to complete
>something), 1 minute seems awfully slow.

I get irritated at the startup time of java add that to my 3 second compile
and I am spitting fire :P - can't imagine waiting for 1 min builds :(

Cheers,

Pete

*------------------------------------------------------*
| "Nearly all men can stand adversity, but if you want |
| to test a man's character, give him power."          |
|       -Abraham Lincoln                               |
*------------------------------------------------------*