Github user ConeyLiu commented on a diff in the pull request: https://github.com/apache/spark/pull/19586#discussion_r147709649 --- Diff: core/src/main/scala/org/apache/spark/serializer/KryoSerializer.scala --- @@ -205,11 +205,45 @@ class KryoSerializationStream( private[this] var kryo: Kryo = serInstance.borrowKryo() + // This is only used when we write object and class separately. + var classWrote = false + override def writeObject[T: ClassTag](t: T): SerializationStream = { kryo.writeClassAndObject(output, t) --- End diff -- From the code, it just write a `varInt` if the class have been registered. And also there need some calculation for getting the `varInt`. But from the test, the overhead looks more serious than I expected.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org