This is an automated email from the ASF dual-hosted git repository. btellier pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/james-project.git
commit da7d1083ce6b87ac2d68b2a1e294e9afa99ead0a Author: Benoit Tellier <[email protected]> AuthorDate: Thu May 20 08:35:22 2021 +0700 [PERFORMANCE] Avoid a collect -> stream -> collect pattern This was costing 0.36% of the CPU for my performance test scenario according to async-profiler --- .../apache/james/jmap/draft/model/message/view/MessageViewFactory.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/server/protocols/jmap-draft/src/main/java/org/apache/james/jmap/draft/model/message/view/MessageViewFactory.java b/server/protocols/jmap-draft/src/main/java/org/apache/james/jmap/draft/model/message/view/MessageViewFactory.java index d0c3e78..6729674 100644 --- a/server/protocols/jmap-draft/src/main/java/org/apache/james/jmap/draft/model/message/view/MessageViewFactory.java +++ b/server/protocols/jmap-draft/src/main/java/org/apache/james/jmap/draft/model/message/view/MessageViewFactory.java @@ -113,8 +113,6 @@ public interface MessageViewFactory<T extends MessageView> { .stream() .map(Field::getBody) .map(body -> DecoderUtil.decodeEncodedWords(body, DecodeMonitor.SILENT)) - .collect(Collectors.toList()) - .stream() .collect(Collectors.joining(JMAP_MULTIVALUED_FIELD_DELIMITER)); return Multimaps.index(fields, Field::getName) --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
