Optimized size for kryo serialization