ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Reilly" <peter.kitt.rei...@gmail.com>
Subject Re: AW: ant really slow, 100% CPU?
Date Fri, 21 Sep 2007 08:33:31 GMT
1) Some of the traces seem to imply a bug.
org.apache.tools.ant.taskdefs.Property$PropertyResolver.evaluate(Property.java:110)
        at
org.apache.tools.ant.PropertyHelper.getProperty(PropertyHelper.java:787)
        - locked <0x00002aaab4013548> (a
org.apache.tools.ant.PropertyHelper)
        at
org.apache.tools.ant.PropertyHelper.parseNextProperty(PropertyHelper.java:541)
        at
org.apache.tools.ant.PropertyHelper.parseProperties(PropertyHelper.java:502)
        at
org.apache.tools.ant.RuntimeConfigurable.maybeConfigure(RuntimeConfigurable.java:390)
The intent of Property.PropertyResolver is I think to remain in
the Property task - the trace seems to imply that it has
escaped from that task.

2) some of the new code seems to be very inefficent:
    private void resolveAllProperties(Map props) throws BuildException {
        PropertyHelper propertyHelper = (PropertyHelper)
PropertyHelper.getPropertyHelper(
                getProject()).clone();
        propertyHelper.add(new PropertyResolver(props));
This means that when one does <property env=".."/>, for
each env variable, the propertyhelper is cloned.

3) The reason for this is to allow different property demarcations -
using ProperyExpander's.
 The use-case for this is to allow "${${a}-${b}}" type expansion (this is
a much requested enhancement).

and in something like a properties file:

action=cut
cut=the cut action
do=the action is ${${action}}
paste=the paste action

can get difficult to parse. The new code
does this is a nice way (except for the
ThreadLocal).

Peter
On 9/20/07, Steve Loughran <stevel@apache.org> wrote:
> Dominique Devienne wrote:
> > On 9/20/07, Steve Loughran <stevel@apache.org> wrote:
> >> it appears to hang at 100% CPU during gzip
> >>
> >> release.gzip-rpm:
> >>        [tar] Building tar: ...
> >>       [gzip] Building:.../smartfrog-rpm-bundle-3.12.003dev.gz
> >>
> >> through the miracle that is kill -QUIT, here's the thread dump
> >
> > Did I miss the gzip task in the stack trace? In both dumps you
> > provided, I see only property stuff, so how does that relate to
> > gzip??? Thanks, --DD
> >
>
> nothing, its just after that task that everything seems to lock up.
>
> But sometimes it jams in other places; other times it just keeps going.
> That is all the sign of race conditions to me: inconsistent behaviour
It appears that the new code for
> --
> Steve Loughran                  http://www.1060.org/blogxter/publish/5
> Author: Ant in Action           http://antbook.org/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message