Github user HyukjinKwon commented on a diff in the pull request: https://github.com/apache/spark/pull/22779#discussion_r232587038 --- Diff: core/src/main/scala/org/apache/spark/serializer/KryoSerializer.scala --- @@ -338,7 +338,7 @@ private[spark] class KryoSerializerInstance(ks: KryoSerializer, useUnsafe: Boole // Make these lazy vals to avoid creating a buffer unless we use them. private lazy val output = ks.newKryoOutput() - private lazy val input = if (useUnsafe) new KryoUnsafeInput() else new KryoInput() + private lazy val input = if (useUnsafe) new KryoUnsafeInput(4096) else new KryoInput(4096) --- End diff -- why do we need to set the buffer size here while that's set by `setBuffer`? Can't we set it only when the `ByteBuffer` is backed by an accessible byte array?
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org