You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by bt...@apache.org on 2021/05/18 14:24:14 UTC
[james-project] 02/07: [PERFORMANCE] MessageResultImpl should use
underlying MailboxMessage
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 667255ea27f5eb5dbfea5a9535c89e6ff7c55f27
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Sun May 16 14:05:07 2021 +0700
[PERFORMANCE] MessageResultImpl should use underlying MailboxMessage
By calling `messageMetadata` too frequently we generate too
much flag copies that are responsible of over 2% of total
memory allocation as per async-profiler.
---
.../org/apache/james/mailbox/store/MessageResultImpl.java | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/MessageResultImpl.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/MessageResultImpl.java
index b52a655..c7671c9 100644
--- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/MessageResultImpl.java
+++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/MessageResultImpl.java
@@ -80,32 +80,32 @@ public class MessageResultImpl implements MessageResult {
@Override
public MessageUid getUid() {
- return messageMetaData().getUid();
+ return message.getUid();
}
@Override
public MessageId getMessageId() {
- return messageMetaData().getMessageId();
+ return message.getMessageId();
}
@Override
public Date getInternalDate() {
- return messageMetaData().getInternalDate();
+ return message.getInternalDate();
}
@Override
public Flags getFlags() {
- return messageMetaData().getFlags();
+ return message.createFlags();
}
@Override
public ModSeq getModSeq() {
- return messageMetaData().getModSeq();
+ return message.getModSeq();
}
@Override
public long getSize() {
- return messageMetaData().getSize();
+ return message.getFullContentOctets();
}
@Override
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org