You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by "Antoine Toulme (JIRA)" <ji...@apache.org> on 2016/05/20 06:56:12 UTC

[jira] [Resolved] (BUILDR-621) ZipTask creates zip file with entries not sorted by path causing very slow unzipping.

     [ https://issues.apache.org/jira/browse/BUILDR-621?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Antoine Toulme resolved BUILDR-621.
-----------------------------------
    Resolution: Fixed

[master ea4103f] BUILDR-621: ZipTask creates zip file with entries not sorted by path causing very slow unzipping. Add sorting of entry keys prior to writing to the ZipOutputStream.
 2 files changed, 4 insertions(+), 1 deletion(-)

> ZipTask creates zip file with entries not sorted by path causing very slow unzipping.
> -------------------------------------------------------------------------------------
>
>                 Key: BUILDR-621
>                 URL: https://issues.apache.org/jira/browse/BUILDR-621
>             Project: Buildr
>          Issue Type: Bug
>          Components: Packaging
>    Affects Versions: 1.4.7
>            Reporter: Russell Teabeault
>            Assignee: Antoine Toulme
>             Fix For: 1.5
>
>
> ZipTask#create_from iterates through the file_map and creates the zip with the entries in no particular order.  With a large zip file this can dramatically slow down unzipping since the physical disk has to do much more random access.  
> Currently the code does:
> file_map.each do |path, content|
> Doing something such as the following would probably be better:
> paths = file_map.keys.sort
> paths.each do |path|
>   content = file_map[path]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)