Skip to content

Commit abc7f13

Browse files
committed
Partial impl of #712 for 2.11
1 parent c92dd82 commit abc7f13

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

release-notes/VERSION-2.x

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ JSON library.
1414
=== Releases ===
1515
------------------------------------------------------------------------
1616

17-
2.12.0 (not yet released)
17+
(not yet released)
18+
19+
#712: (partial) Optimize array allocation by JsonStringEncoder
1820

1921
2.11.4 (12-Dec-2020)
2022

src/main/java/com/fasterxml/jackson/core/io/JsonStringEncoder.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ public final class JsonStringEncoder
3030
private final static int SURR2_FIRST = 0xDC00;
3131
private final static int SURR2_LAST = 0xDFFF;
3232

33-
private final static int INITIAL_CHAR_BUFFER_SIZE = 120;
34-
private final static int INITIAL_BYTE_BUFFER_SIZE = 200;
33+
// 18-Aug-2021, tatu: [core#712] use bit lower defaults for 2.11/2.12
34+
private final static int INITIAL_CHAR_BUFFER_SIZE = 30;
35+
private final static int INITIAL_BYTE_BUFFER_SIZE = 60;
3536

3637
/*
3738
/**********************************************************************

0 commit comments

Comments
 (0)