You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mime4j-dev@james.apache.org by "Benoit Tellier (Jira)" <mi...@james.apache.org> on 2021/09/18 07:39:00 UTC
[jira] [Closed] (MIME4J-305) ContentUtil::decode can avoid using
StringBuilder
[ https://issues.apache.org/jira/browse/MIME4J-305?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benoit Tellier closed MIME4J-305.
---------------------------------
Resolution: Fixed
> ContentUtil::decode can avoid using StringBuilder
> -------------------------------------------------
>
> Key: MIME4J-305
> URL: https://issues.apache.org/jira/browse/MIME4J-305
> Project: James Mime4j
> Issue Type: Improvement
> Components: core
> Affects Versions: 0.8.5
> Reporter: Benoit Tellier
> Priority: Major
> Fix For: 0.8.6
>
> Attachments: after_decode.png, before_decode.png
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> StringBuilder is an expensive construct, we spend most of our time, for each character, ensuring the capacity of the string builder.
> Size being known, the operation simple, we can directly operate on top of a char array.
> Gains: 78%
> See the attached flame graphs:
> - Before
> - After (combine with MIME4J-304 and unfold operations)
--
This message was sent by Atlassian Jira
(v8.3.4#803005)