MIME4J-305 ContentUtil::decode can avoid using StringBuilder (#51)
authorBenoit TELLIER <btellier@linagora.com>
Sat, 4 Sep 2021 08:42:47 +0000 (15:42 +0700)
committerGitHub <noreply@github.com>
Sat, 4 Sep 2021 08:42:47 +0000 (15:42 +0700)
commita756b7251e03559c7d6b21293fc607f948c52cce
treecb04b36f7ee34818267cbc0520ca2648923b2821
parentac4c468cb230fb691cbde70c682f7180b55c52c7
MIME4J-305 ContentUtil::decode can avoid using StringBuilder (#51)

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%
core/src/main/java/org/apache/james/mime4j/util/ContentUtil.java