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/06/03 23:20:30 UTC
DO NOT REPLY [Bug 49384] New: Fix for Bug 48746 causes slowdown in
chmod task execution
https://issues.apache.org/bugzilla/show_bug.cgi?id=49384
Summary: Fix for Bug 48746 causes slowdown in chmod task
execution
Product: Ant
Version: 1.8.1
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Core tasks
AssignedTo: notifications@ant.apache.org
ReportedBy: dopey@moonteeth.com
The fix for bug 48746 causes slowdown in task execution significantly.
On my system with the "time" command it appears to add around 400ms of latency
for each process exec.
I've only tested it on chmod, because one of our projects has need to chmod
massive files.
I have a simple build.xml:
<project name="chmodtest" default="doChmodSingle" basedir=".">
<target name="doChmodSingle">
<chmod dir="." type="file" perm="755" includes="**" parallel="false"/>
</target>
<target name="doChmodParallel">
<chmod dir="." type="file" perm="755" includes="**" parallel="true"/>
</target>
</project>
run against 100 files created with:
for i in `seq 1 100`; do touch $i; done
With the 1.8.1 stock PumpStreamHandler:
Buildfile: /mnt/disk1/home/awang/test/build.xml
doChmodSingle:
BUILD SUCCESSFUL
Total time: 41 seconds
real 0m41.483s
user 0m0.738s
sys 0m0.614s
With the Os.isFamily("windows") back in the StreamPumper constructor (this was
removed and replaced with true for the fix for bug 48746) the results are:
Buildfile: /mnt/disk1/home/awang/test/build.xml
doChmodSingle:
BUILD SUCCESSFUL
Total time: 0 seconds
real 0m1.079s
user 0m0.704s
sys 0m0.601s
With the doChmodParallel, the results are consistently:
stock 1.8.1 behavior
real 0m0.874s (this varies from 872-875 on about a dozen runs)
Os.isFamily("windows") check behavior:
real 0m0.474s (this is pretty consistent)
Because of AIX's annoying handling of parallelism, for certain large
directories, we just gave up and turned off parallelism. Even with a realistic
maxparallel, the extra 400ms per execution can add as minutes to the build
script time.
--
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 49384] Fix for Bug 48746 causes slowdown in chmod
task execution
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49384
Jesse Glick <jg...@netbeans.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Blocks| |48746
--- Comment #3 from Jesse Glick <jg...@netbeans.org> 2010-06-08 15:04:41 EDT ---
Just marking bug relationships.
--
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 49384] Fix for Bug 48746 causes slowdown in chmod
task execution
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49384
--- Comment #1 from Andy Wang <do...@moonteeth.com> 2010-06-03 17:35:54 EDT ---
Created an attachment (id=25522)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=25522)
stack trace for chmod task call
Stack trace during chmod task call.
"Thread-165" daemon prio=10 tid=0x00007f548823a000 nid=0x1a73 in Object.wait()
[0x00007f540249a000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00007f545c633fd8> (a
org.apache.tools.ant.taskdefs.StreamPumper)
at
org.apache.tools.ant.taskdefs.StreamPumper.waitForInput(StreamPumper.java:229)
- locked <0x00007f545c633fd8> (a org.apache.tools.ant.taskdefs.StreamPumper)
at org.apache.tools.ant.taskdefs.StreamPumper.run(StreamPumper.java:126)
at java.lang.Thread.run(Thread.java:619)
Basically, Threads with this same stack get continually created, and sit around
for about half a second per chmod call. Don't know if this is helpful or not
--
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 49384] Fix for Bug 48746 causes slowdown in chmod
task execution
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49384
--- Comment #5 from Jesse Glick <jg...@netbeans.org> 2010-06-23 09:32:15 EDT ---
(In reply to comment #4)
> [java.io.File methods in JDK 6] don't provide the same functionality -
> you can't change permission for the group or set sticky bits.
How often do people set a sticky bit from Ant? What people usually want is o-w,
go-r, or a+x, all of which you can do from java.io.File.
Note that JDK 7 has APIs permitting full control over file attributes:
http://java.sun.com/javase/7/docs/api/java/nio/file/attribute/PosixFilePermissions.html
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
[Bug 49384] Fix for Bug 48746 causes slowdown in chmod task
execution
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49384
Stefan Bodewig <bo...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #8 from Stefan Bodewig <bo...@apache.org> ---
*** This bug has been marked as a duplicate of bug 54128 ***
--
You are receiving this mail because:
You are the assignee for the bug.
DO NOT REPLY [Bug 49384] Fix for Bug 48746 causes slowdown in chmod
task execution
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49384
Jesse Glick <jg...@netbeans.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jglick@netbeans.org
--- Comment #2 from Jesse Glick <jg...@netbeans.org> 2010-06-08 15:04:19 EDT ---
Chmod should just be fixed to use File.set* calls when running on JDK 6+, which
would be far faster, and probably more reliable as well.
--
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 49384] Fix for Bug 48746 causes slowdown in chmod
task execution
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49384
--- Comment #4 from Stefan Bodewig <bo...@apache.org> 2010-06-23 08:23:02 EDT ---
(In reply to comment #2)
> Chmod should just be fixed to use File.set* calls when running on JDK 6+, which
> would be far faster, and probably more reliable as well.
but don't provide the same functionality - you can't change permission for the
group or set sticky bits.
I agree that a File.set* based task as a cross-platform alterantive to chmod
and attrib would be nice.
--
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 49384] Fix for Bug 48746 causes slowdown in chmod
task execution
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49384
Antoine Levy-Lambert <an...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|1.8.1 |1.8.2
--
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 49384] Fix for Bug 48746 causes slowdown in chmod
task execution
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49384
--- Comment #6 from Stefan Bodewig <bo...@apache.org> 2010-06-23 10:19:59 EDT ---
(In reply to comment #5)
> (In reply to comment #4)
> > [java.io.File methods in JDK 6] don't provide the same functionality -
> > you can't change permission for the group or set sticky bits.
>
> How often do people set a sticky bit from Ant?
No too often.
> What people usually want is o-w, go-r, or a+x, all of which you can do from
> java.io.File.
I'm not sure how common different permissions for group and others would be,
which I don't think you could achieve with the File API.
> Note that JDK 7 has APIs permitting full control over file attributes:
Which is even further in the future.
Like I said, such a task would be a nice alternative but won't be able to
replace the current tasks completely.
--
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 49384] Fix for Bug 48746 causes slowdown in chmod
task execution
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49384
--- Comment #7 from Andy Wang <do...@moonteeth.com> 2010-07-26 17:25:12 EDT ---
So funny you should mention sticky bits. One of the uses for me is the sticky
bit.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.