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/05/19 06:33:45 UTC

[james-project] 02/04: [PERF] ImapResponseComposerImpl: Reduce buffer size

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 e17f30a8a23729253eb3da489b64f39318f9a136
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Mon May 16 10:45:23 2022 +0700

    [PERF] ImapResponseComposerImpl: Reduce buffer size
    
    This buffer is allocated on each request but is
    needlessly big: most IMAP response lines are rather small
    on th exception of IMAP SEARCH that anyway largely
    exceeds the pre sized buffer.
---
 .../org/apache/james/imap/encode/base/ImapResponseComposerImpl.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/protocols/imap/src/main/java/org/apache/james/imap/encode/base/ImapResponseComposerImpl.java b/protocols/imap/src/main/java/org/apache/james/imap/encode/base/ImapResponseComposerImpl.java
index f266e70a2e..6a8a8db8da 100644
--- a/protocols/imap/src/main/java/org/apache/james/imap/encode/base/ImapResponseComposerImpl.java
+++ b/protocols/imap/src/main/java/org/apache/james/imap/encode/base/ImapResponseComposerImpl.java
@@ -45,7 +45,7 @@ public class ImapResponseComposerImpl implements ImapConstants, ImapResponseComp
     public static final byte[] FLAGS = "FLAGS".getBytes(US_ASCII);
 
     private static final int LOWER_CASE_OFFSET = 'a' - 'A';
-    public static final int DEFAULT_BUFFER_SIZE = 2048;
+    public static final int DEFAULT_BUFFER_SIZE = 256;
     private static final byte[] SEEN = "\\Seen".getBytes(US_ASCII);
     private static final byte[] RECENT = "\\Recent".getBytes(US_ASCII);
     private static final byte[] FLAGGED = "\\Flagged".getBytes(US_ASCII);


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org