jenkins - 7zip takes forever to extract -
compressing set of folders using 7zip, this:
def list = ["dir1", "dir2", "dir3"] (int = 0; < list.size(); i++) { def dir = list.get(i); bat "7z %cd%\\artifacts\\${dir}.zip %cd%\\src\\${dir}\\obj\\*" }
then copy on zips shared drive , extract them remotely using:
def list_a = ["dir1", "dir2", "dir3"] (int = 0; < list_a.size(); i++) { def dir = list_a.get(i); bat "copy %cd%\\artifacts\\${dir}.zip \\\\shared_drive\" bat "7z x \\\\shared_drive\\\${dir}.zip -o\\\\shared_drive\\\${dir} -y" //this step extraction, takes long time folders lot of files in ( compared using gui (right click , extract on folder) bat "del /q \\\\shared_drive\\\${dir}.zip" }
i retaining folder structure while extracting.
is there way in can fasten extraction process speed while using graphical interface mouse?
i wouldn't expect difference between cli , gui. there's 1 common pitfall in setup, though: extracting archive network same network drive can slow.
it better avoid intermediate step of copying archive share. if %cd%
local drive in setup, do:
def list_a = ["dir1", "dir2", "dir3"] (int = 0; < list_a.size(); i++) { def dir = list_a.get(i); bat "7z x %cd%\\artifacts\\${dir}.zip -o\\\\shared_drive\\\${dir} -y" //this step extraction, takes long time folders lot of files in ( compared using gui (right click , extract on folder) }
otherwise, may worth copying archive local drive first, , extract then.
Comments
Post a Comment