Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/ant/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Performance Ant 1.8.0低性能_Performance_Ant_Exec - Fatal编程技术网

Performance Ant 1.8.0低性能

Performance Ant 1.8.0低性能,performance,ant,exec,Performance,Ant,Exec,新的Ant1.8.0(2月1日发布)引入了一些很酷的特性,所以我用新的Ant尝试了我的构建/部署脚本 我很惊讶一些目标的执行时间会慢10-30倍!下面是Exec任务的简单示例,尽管我在其他任务类型中也遇到了性能问题 <target name="create_backup_impl" if="db.make_backup" > <echo message="Backup is starting.." /> <exec executable="${db.

新的Ant1.8.0(2月1日发布)引入了一些很酷的特性,所以我用新的Ant尝试了我的构建/部署脚本

我很惊讶一些目标的执行时间会慢10-30倍!下面是Exec任务的简单示例,尽管我在其他任务类型中也遇到了性能问题

<target name="create_backup_impl" if="db.make_backup" >
    <echo message="Backup is starting.." />
    <exec executable="${db.dump_executable}"    
            output="${db.backup_file}"
            failonerror="true">
        <arg value="-h${db.host}" />
        <arg value="-u${db.userid}" />
        <arg value="-p${db.password}" /> 
        <arg value="${db.backup_options}" /> 
        <arg value="${db.name}" />      
    </exec>
    <echo message="Backup completed!" />
</target>


它是备份数据库的目标(备份大小~100 Mb)。Ant 1.7.1工作约30秒,Ant 1.8.0-15分钟。我试了几次,效果稳定。Ant1.8的处理器负载非常低,旧版本的处理器负载接近50%。看起来进程优先级有问题或IO操作速度慢。有什么想法吗?

我建议直接向Ant团队提交bug报告。他们的响应时间通常非常好


在使用时,我看到类似的性能下降

<apply executable="...">
   ...
</apply> 
(见注释29)


ANT 1.8.1的性能略有提高,但仍比ANT 1.7.1差:(见注释2)。

因此,必须降级到1.7.1。要获得良好的性能?有没有调试或配置的方法?