KryoNamespace: smaller initial buffer size
Change-Id: I12bf2b09824302c3f626435a64c1e9795621dd6d
diff --git a/utils/misc/src/main/java/org/onlab/util/KryoNamespace.java b/utils/misc/src/main/java/org/onlab/util/KryoNamespace.java
index cb3d2bd..b89544e 100644
--- a/utils/misc/src/main/java/org/onlab/util/KryoNamespace.java
+++ b/utils/misc/src/main/java/org/onlab/util/KryoNamespace.java
@@ -42,7 +42,7 @@
*
* @see #serialize(Object)
*/
- public static final int DEFAULT_BUFFER_SIZE = 1 * 1000 * 1000;
+ public static final int DEFAULT_BUFFER_SIZE = 4096;
public static final int MAX_BUFFER_SIZE = 100 * 1000 * 1000;
private final ConcurrentLinkedQueue<Kryo> pool = new ConcurrentLinkedQueue<>();
@@ -171,7 +171,7 @@
/**
* Serializes given object to byte array using Kryo instance in pool.
* <p>
- * Note: Serialized bytes must be smaller than {@link #DEFAULT_BUFFER_SIZE}.
+ * Note: Serialized bytes must be smaller than {@link #MAX_BUFFER_SIZE}.
*
* @param obj Object to serialize
* @return serialized bytes