ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From EXT / FOCAL MALAPRADE Roland <ext.focal.malapr...@sncf.fr>
Subject Questions about <foreach> task and properties and memory
Date Thu, 19 Sep 2002 13:37:44 GMT
Hi everybody,

sorry if this is a bit long :)

I have made a build script to do the following:
- download a bunch of folders containing zip files off an FTP server (one
folder for each month)
- create a report for each month in a "csv" file by:
  - checking which zip files are there (there are 50 in all)
  - if a zip file is there, checking which files it contains (up to 11
files)

now there are 3 <foreach> calls which basically amount to this (in
pseudocode):

for (...) {
	...tasks...
  	for (...) {
  		...tasks...
    		for (...) {
			...tasks...
    		}
  	}
}

The foreach tasks have "inheritall" set to false, but as I've defined my
properties outside of any target (as children of project), they seem to be
available everywhere.

Now the problem is that to process each month takes about 50 megs of memory,
and the script caused java.lang.OutOfMemoryError before I set my ANT_OPTS
(-Xmx -Xms)

Now my questions are <finally :)> 

1. Is this memory usage normal, or is it a bug in <foreach> ?

2. Should Ant not be used in this way ?

3. Instead of defining my properties outside a target, should i put them in
the "init" target, and only pass the necessary info as params to "foreach"
(maybe this will use less memory) ?

4. Are you still reading ;) ?

Any help would be useful.
Roland.

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message