Yuta HIGUCHI

KryoNamespace: smaller initial buffer size

Change-Id: I12bf2b09824302c3f626435a64c1e9795621dd6d
...@@ -42,7 +42,7 @@ public final class KryoNamespace implements KryoFactory { ...@@ -42,7 +42,7 @@ public final class KryoNamespace implements KryoFactory {
42 * 42 *
43 * @see #serialize(Object) 43 * @see #serialize(Object)
44 */ 44 */
45 - public static final int DEFAULT_BUFFER_SIZE = 1 * 1000 * 1000; 45 + public static final int DEFAULT_BUFFER_SIZE = 4096;
46 public static final int MAX_BUFFER_SIZE = 100 * 1000 * 1000; 46 public static final int MAX_BUFFER_SIZE = 100 * 1000 * 1000;
47 47
48 private final ConcurrentLinkedQueue<Kryo> pool = new ConcurrentLinkedQueue<>(); 48 private final ConcurrentLinkedQueue<Kryo> pool = new ConcurrentLinkedQueue<>();
...@@ -171,7 +171,7 @@ public final class KryoNamespace implements KryoFactory { ...@@ -171,7 +171,7 @@ public final class KryoNamespace implements KryoFactory {
171 /** 171 /**
172 * Serializes given object to byte array using Kryo instance in pool. 172 * Serializes given object to byte array using Kryo instance in pool.
173 * <p> 173 * <p>
174 - * Note: Serialized bytes must be smaller than {@link #DEFAULT_BUFFER_SIZE}. 174 + * Note: Serialized bytes must be smaller than {@link #MAX_BUFFER_SIZE}.
175 * 175 *
176 * @param obj Object to serialize 176 * @param obj Object to serialize
177 * @return serialized bytes 177 * @return serialized bytes
......