MIME4J-306 MimeUtil::unfold should group char appends (#52)
authorBenoit TELLIER <btellier@linagora.com>
Sat, 4 Sep 2021 08:42:57 +0000 (15:42 +0700)
committerGitHub <noreply@github.com>
Sat, 4 Sep 2021 08:42:57 +0000 (15:42 +0700)
commit0b43a1eef820ae9148013380f3207e6cce23323f
treebb81a4474842711d0f00c4141d3b2c74c38bb3aa
parenta756b7251e03559c7d6b21293fc607f948c52cce
MIME4J-306 MimeUtil::unfold should group char appends (#52)

Calling repeatedly append requires ensuring the capacity amongst other.

Appends to the string builder can be done for all previous chars when a line delimiter is encountered, thus reducing the cost of the operation.

Gain: 66%
core/src/main/java/org/apache/james/mime4j/util/MimeUtil.java