You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Jaeheon-Lee (Jira)" <ji...@apache.org> on 2023/09/26 23:50:00 UTC
[jira] [Commented] (EMAIL-206) Use SharedByteArrayInputStream for memory usage
[ https://issues.apache.org/jira/browse/EMAIL-206?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17769376#comment-17769376 ]
Jaeheon-Lee commented on EMAIL-206:
-----------------------------------
[~ggregory]
I haven't received feedback from this issue and PR for over a month.
Please check if anything has been reviewed.
> 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
>
> *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)