You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2010/03/22 17:49:36 UTC

DO NOT REPLY [Bug 48961] New: Performance problem with Ant 1.8.0 in conjunction with the Ant-Contrib "variable" task

https://issues.apache.org/bugzilla/show_bug.cgi?id=48961

           Summary: Performance problem with Ant 1.8.0 in conjunction with
                    the Ant-Contrib "variable" task
           Product: Ant
           Version: 1.8.0
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: regression
          Priority: P2
         Component: Core
        AssignedTo: notifications@ant.apache.org
        ReportedBy: christoph.grothaus@isr.de


Created an attachment (id=25165)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25165)
Ant and Ant-Contrib Performance Leak debugging script

There is a regression from Ant 1.7.1 to Ant 1.8.0 regarding performance. The
Ant-Contrib "variable" task has slowed down significantly with the new Ant
version. I wrote a little demonstration script, see the attached file
"AntDebug.zip".

The story goes as this: I have a for loop (also from Ant-Contrib), that loops
over a path-like structure. Inside the for loop I use the "variable" task from
Ant-Contrib (<var name="testvar" value="..." />) to append a string (built of
the iteration element) to a variable. So this variable grows with each
iteration.

I assume this is a pure in-memory operation. With Ant 1.7.1, it is blazing
fast, as you could expect. With Ant 1.8.0, the performance is worse. Moreover,
each single iteration is a bit slower than the previous one, so in total the
performance degrades exponentially in the number of elements. You can also
observe that it takes longer if the iteration elements are longer strings.

If you comment out the "variable" task, the for loop runs equally fast with
both Ant versions.

You can play around with the attached demonstration script. On my machine, it
takes 8 seconds if the basedir is /tmp/AntDebug, and 16 seconds if the basedir
is somewhere much deeper in the filesystem. With Ant 1.7.1, in both locations
it takes 0 seconds (I think it's somewhat below 500ms, which in turn is rounded
down).

Also see the companion mail thread on the ant-user mailing list:
http://mail-archives.apache.org/mod_mbox/ant-user/201003.mbox/%3COF85426667.E1376D33-ONC12576EE.003DDF91-C12576EE.003F6402@isr.de%3E

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 48961] Performance problem with Ant 1.8.0 in conjunction with the Ant-Contrib "variable" task

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48961

Christoph Grothaus <ch...@isr.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |christoph.grothaus@isr.de

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 48961] Performance problem with Ant 1.8.0 in conjunction with the Ant-Contrib "variable" task

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48961

--- Comment #1 from Matt Benson <mb...@apache.org> 2010-04-09 15:16:42 UTC ---
I have just committed a change to PropertyHelper to use a different approach
than the costly indexOf check.  It may address the noted performance
degradation:

Committed revision 932456.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 48961] Performance problem with Ant 1.8.0 in conjunction with the Ant-Contrib "variable" task

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48961

--- Comment #2 from Christoph Grothaus <ch...@isr.de> 2010-04-12 04:52:16 EDT ---
(In reply to comment #1)
Hello Matt,

I just checked out the latest Ant sources from SVN, built them, and ran my test
against this build. Your fix did it, now the ant script runs fast again! In my
opinion this bug is resolved.

Thank you.
Christoph

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 48961] Performance problem with Ant 1.8.0 in conjunction with the Ant-Contrib "variable" task

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48961

Stefan Bodewig <bo...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |1.8.1

--- Comment #3 from Stefan Bodewig <bo...@apache.org> 2010-04-12 06:14:58 EDT ---
Thanks for testing

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.