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 2022/03/16 01:18:33 UTC
[james-project] 03/11: [PERF] Avoid calling toString on IMAP commands if not strictly needed
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 30e643339b693190f725798144c21a9e574f4d37
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Fri Mar 11 08:42:13 2022 +0700
[PERF] Avoid calling toString on IMAP commands if not strictly needed
---
.../apache/james/imap/processor/base/AbstractChainedProcessor.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/protocols/imap/src/main/java/org/apache/james/imap/processor/base/AbstractChainedProcessor.java b/protocols/imap/src/main/java/org/apache/james/imap/processor/base/AbstractChainedProcessor.java
index 9eaf492..448eeb2 100644
--- a/protocols/imap/src/main/java/org/apache/james/imap/processor/base/AbstractChainedProcessor.java
+++ b/protocols/imap/src/main/java/org/apache/james/imap/processor/base/AbstractChainedProcessor.java
@@ -54,7 +54,9 @@ public abstract class AbstractChainedProcessor<M extends ImapMessage> implements
M acceptableMessage = (M) message;
try (Closeable closeable = addContextToMDC(acceptableMessage)) {
try {
- LOGGER.debug("Processing {}", message.toString());
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("Processing {}", message.toString());
+ }
doProcess(acceptableMessage, responder, session);
} catch (RuntimeException e) {
LOGGER.error("Error while processing IMAP request", e);
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org