ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lee, Michael.M" <>
Subject RE: Removing whitespace in the code
Date Tue, 25 Feb 2003 20:54:43 GMT
Ok, so i was asking a little different question.

What I'm trying to optimize is HTML files.  We are trying to cut down the
time that take to send a html file to a user.  In order to do that, we
thought it will be better to get rid of whitespace in html.  we have done
that manually before but i heard there is a way to do this in ANT.

is it true?

Thanks for your attention!


-----Original Message-----
From: Mike Ayers []
Sent: Tuesday, February 25, 2003 2:08 PM
To: Ant Users List
Subject: RE: Removing whitespace in the code

> From: Lee, Michael.M []
> Sent: Tuesday, February 25, 2003 11:41 AM

> When I write code, I like to put indentations on every line 
> so it's easy to
> read ( i think everyone does).  However, when i package the code, the
> whitespace used for indentation takes up to 30-40 percent of 
> the file size!
> So i would like to get rid of all the white space before i build the
> application.  
> is it possible with Ant?  if so, how should i do that?

	I'm having trouble following this.  Do you believe that preremoving
whitespace will make your application compile faster?  Any difference would
be too small to notice.  Are you packaging the source code?  If you use a
packaging method, such as jar, zip or tar.gz, that has compression as an
integral part, the whitespace will be highly compressible and have little
effect on your final file size, as well as keep your files readable.  Please
give consideration as to whether this is necessary.

	If you still wish to strip out those spaces, you will probably have
to do some customization, unless I missed something.  The closest I could
get was the LoadFile task with a custom FilterReader, but I still couldn't
figure out how to write the property back to a file.


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

View raw message