[ 
http://jira.codehaus.org/browse/MASSEMBLY-499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=236653#action_236653
 ] 

Altin Papa commented on MASSEMBLY-499:
--------------------------------------

The bulk of the slowdown is due to DirectoryArchiver calling this for every 
file:
{code}
ArchiveEntryUtils.chmod( outFile, entry.getMode(), getLogger() );
{code} 

Until this is fixed, I don't think we'll see significant improvements. Even 
with JDK 6's own permission handling, setting them on every file is pretty 
onerous.

At a minimum, the above line should only be called if the entry's mode is NOT 
'default'.
But perhaps there ought to be a dedicated mojo param to turn off permissions 
entirely. (Or vice versa, if you want them off by default.)

Right now, you have no way of avoiding the overhead, even if you don't care 
about setting permissions in the assembly, 

> Poor performance in DirectoryArchiver due to unnecessary native calls
> ---------------------------------------------------------------------
>
>                 Key: MASSEMBLY-499
>                 URL: http://jira.codehaus.org/browse/MASSEMBLY-499
>             Project: Maven 2.x Assembly Plugin
>          Issue Type: Bug
>    Affects Versions: 2.2-beta-5
>         Environment: Unix/Linux
>            Reporter: Altin Papa
>            Assignee: Olivier Lamy
>             Fix For: 2.2-beta-6
>
>
> 1) 
> maven-assembly-plugin calls DirectoryArchiver.copyFile( ArchiveEntry entry, 
> String vPath ), which calls
> ArchiveEntryUtils.chmod( outFile, entry.getMode(), getLogger() );
> resulting in a native child Process being forked to do a chmod (on Unix only)
> The performance impact on a large assembly is enormous: patching 
> DirectoryArchiver to not do this resulted in a performance improvement by 
> more than 5 times.
> I've raised this with Plexus as http://jira.codehaus.org/browse/PLXCOMP-156
> 2)
> AssemblyFormatUtils should cache the environment, as AssemblyInterpolator 
> does. Both, though, should use the latest *plexus* CommandLineUtils, as 
> opposed to maven-assembly-plugin's own version. The plexus class uses 
> System.getenv() (JDK5+) when available. 
> Generally, please see if you can review the use of native command calls, esp. 
> in light of JDK5/6 APIs. Forked native calls had a horrible performance 
> impact on our (large, highly modular) assembly; which has only been corrected 
> by local patches of maven-assembly/plexus-archiver.
> Thanks!

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to