Skip to content

Commit

Permalink
increase initial StringBuilder size
Browse files Browse the repository at this point in the history
  • Loading branch information
ceki committed Feb 1, 2017
1 parent a0318b3 commit 0aaf157
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@

abstract public class PatternLayoutBase<E> extends LayoutBase<E> {


static final int INTIAL_STRING_BUILDER_SIZE = 256;

Converter<E> head;
String pattern;
protected PostCompileProcessor<E> postCompileProcessor;
Expand Down Expand Up @@ -108,7 +111,7 @@ protected void setContextForConverters(Converter<E> head) {
}

protected String writeLoopOnConverters(E event) {
StringBuilder buf = new StringBuilder(128);
StringBuilder buf = new StringBuilder(INTIAL_STRING_BUILDER_SIZE);
Converter<E> c = head;
while (c != null) {
c.write(buf, event);
Expand Down

0 comments on commit 0aaf157

Please sign in to comment.