Jaeheon-Lee created EMAIL-206:
---------------------------------

             Summary: 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


*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)

Reply via email to