Github user srowen commented on a diff in the pull request: https://github.com/apache/spark/pull/22779#discussion_r233504880 --- 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 -- Yeah, this will be a wasted allocation in the 'hasArray' case, and should be set below.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org