From 61b4b0f0291d5cb7197343f0f7babf0f52e9ce05 Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Tue, 18 Feb 2014 13:59:04 +0100 Subject: [PATCH] 428232 - Rework batch mode / buffering in websocket. Better default size for SimpleTextMessage Utf8StringBuilder, to avoid multiple expansions and data copy of the underlying array. --- .../jetty/websocket/common/message/SimpleTextMessage.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/message/SimpleTextMessage.java b/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/message/SimpleTextMessage.java index 3580ca97e80..c6105b39903 100644 --- a/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/message/SimpleTextMessage.java +++ b/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/message/SimpleTextMessage.java @@ -34,7 +34,7 @@ public class SimpleTextMessage implements MessageAppender public SimpleTextMessage(EventDriver onEvent) { this.onEvent = onEvent; - this.utf = new Utf8StringBuilder(); + this.utf = new Utf8StringBuilder(1024); size = 0; finished = false; }