Skip to content

Commit e17f30a

Browse files
committed
[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.
1 parent cc247bc commit e17f30a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

protocols/imap/src/main/java/org/apache/james/imap/encode/base/ImapResponseComposerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public class ImapResponseComposerImpl implements ImapConstants, ImapResponseComp
4545
public static final byte[] FLAGS = "FLAGS".getBytes(US_ASCII);
4646

4747
private static final int LOWER_CASE_OFFSET = 'a' - 'A';
48-
public static final int DEFAULT_BUFFER_SIZE = 2048;
48+
public static final int DEFAULT_BUFFER_SIZE = 256;
4949
private static final byte[] SEEN = "\\Seen".getBytes(US_ASCII);
5050
private static final byte[] RECENT = "\\Recent".getBytes(US_ASCII);
5151
private static final byte[] FLAGGED = "\\Flagged".getBytes(US_ASCII);

0 commit comments

Comments
 (0)