You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary D. Gregory (Jira)" <ji...@apache.org> on 2023/12/12 02:05:00 UTC

[jira] [Resolved] (EMAIL-206) Use SharedByteArrayInputStream for memory usage

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

Gary D. Gregory resolved EMAIL-206.
-----------------------------------
    Fix Version/s: 1.6.0
       Resolution: Fixed

> Use SharedByteArrayInputStream for memory usage
> -----------------------------------------------
>
>                 Key: EMAIL-206
>                 URL: https://issues.apache.org/jira/browse/EMAIL-206
>             Project: Commons Email
>          Issue Type: Improvement
>    Affects Versions: 1.5
>            Reporter: Jaeheon-Lee
>            Priority: Major
>             Fix For: 1.6.0
>
>
> *Issue*
> Memory usage is wasted because *MimeMessageUtils* writes *ByteArrayInputStream* instead of {*}SharedByteArrayInputStream{*}.
>  
> *SharedInputStream*
> `Java Mail API` provides a mechanism to save memory usage.
> If you use {*}SharedByteInputStream{*}, you can use it as a *Call by Reference* without assigning a new byte[] of the factor.
>  
> Please refer to the following for detailed memory usage comparison.
>  * https://github.com/apache/commons-email/pull/157 
>  
> Thanks



--
This message was sent by Atlassian Jira
(v8.20.10#820010)