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

Thomas Mair updated COMPRESS-172:
---------------------------------

    Attachment: tarbuffer.patch
    
> Reuse of buffers while reading stream and skipping stream
> ---------------------------------------------------------
>
>                 Key: COMPRESS-172
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-172
>             Project: Commons Compress
>          Issue Type: Improvement
>          Components: Archivers
>    Affects Versions: 1.3
>            Reporter: Thomas Mair
>            Priority: Minor
>              Labels: patch
>         Attachments: tarbuffer.patch
>
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> When reading a tar archive from a stream for each record a new buffer is 
> allocated. This will cause many new objects that later get collected by the 
> garbage collector. The same issue exists when we are skipping entries. 
> Instead of allocating new buffers we could reuse one single buffer. This 
> saves some GC overhead as well as the time needed to allocate new memory. I 
> created a small patch fixing this issue. I did not test this patch 
> thoughtfully, but it should not cause any trouble, as the buffers never leave 
> their respective classes.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to