Community
Participate
Working Groups
Build ID: 3.2 If you have a large product build (100Mb or more) then your build takes longer than is necessary because the zip tasks are invoked multiple times using the "update" flag, which essentially copies the file to a new file each time the zip task is run. Steps To Reproduce: 1. Create a product build file. 2. Run the PDE build 3. Open the assemble.org.eclipse.pde.build.container.feature.win32.win32.x86.xml and you will see that in the main target there are multiple zip tasks all updating the one destfile. e.g. <zip destfile="${archiveFullPath}" filesonly="false" whenempty="skip" update="true"> <zipfileset file="${eclipse.base}/plugins/test.pde.plugin_1.0.0.jar" fullpath="${pluginArchivePrefix}/test.pde.plugin_1.0.0.jar" /> </zip> <zip destfile="${archiveFullPath}" filesonly="false" whenempty="skip" update="true"> <zipfileset dir="${eclipse.base}/win32.win32.x86/${collectingFolder}" includes="**/**" excludes="${launcherName}" prefix="${archivePrefix}" /> <zipfileset file="${eclipse.base}/win32.win32.x86/${collectingFolder}/${launcherName}" fullpath="${archivePrefix}/${launcherName}" filemode="755" /> </zip> What should be happening is that there is one zip task with all the filesets needed within that task, e.g: <zip destfile="${archiveFullPath}" filesonly="false" whenempty="skip" update="true"> <zipfileset file="${eclipse.base}/plugins/test.pde.plugin_1.0.0.jar" fullpath="${pluginArchivePrefix}/test.pde.plugin_1.0.0.jar" /> <zipfileset dir="${eclipse.base}/win32.win32.x86/${collectingFolder}" includes="**/**" excludes="${launcherName}" prefix="${archivePrefix}" /> <zipfileset file="${eclipse.base}/win32.win32.x86/${collectingFolder}/${launcherName}" fullpath="${archivePrefix}/${launcherName}" filemode="755" /> </zip> The attached patch, with integration tests (depends upon 177677 being implemented) fixes this issue.
I realised I had an older version of PDE, so I have updated this to the 3.2.2 build.
Created attachment 61640 [details] Patch for enhancement
To clarify, we want one call to create the resulting archive file. This must work for all the archive formats and across the assemble / package boundary. (I have not yet looked at the attached patch, is it only for zip or does it do the other formats as well?)
It does it for AntZip only at this stage, it was the only one I was trying. I have modified the Zip generation as well, but for some reason there is code in there to break up the arguments into lots of no more than 15 arguments, so I have just refactored it to make it easier to understand. I do have integration tests for those too. I'm at home at the moment, so I don't know what was done for AntTar. I figured a partial fix was better than no fix and really can't see why anyone would use AntTar. Zip is available on all platforms.
Also the assemble/package has not been modified. It behaves exactly as before it just means only one call to Ant's Zip per assemble or package is done instead of the many calls that currently are done. So at worst you get two Zip's happening, one for assemble and then another one for package.
Currently we are not actively enhancing PDE build anymore. Therefore, I close this bug as WONTFIX. Please reopen, if you plan to provide a fix.