Closed
Description
Version 2.2.3 does untyped deserialization dramatically slower (about 150x in the benchmark I am using) than 2.2.2. I'm testing with a json object that has a few levels of nesting (maps within maps; some keys are lists too) with a loop that looks like this:
def timeJacksonJava(reps: Int) = {
var ret: Seq[AnyRef] = null
val jm = new ObjectMapper
for (i <- 0 until reps) {
val xs = bytess map (jm.readValue(_, classOf[AnyRef]))
if (ret == null) {
ret = xs
}
}
ret
}
def timeJacksonScala(reps: Int) = {
var ret: Seq[AnyRef] = null
val jm = new ObjectMapper()
jm.registerModule(DefaultScalaModule)
for (i <- 0 until reps) {
val xs = bytess map (jm.readValue(_, classOf[AnyRef]))
if (ret == null) {
ret = xs
}
}
ret
}
bytess is a Seq[Array[Byte]]
where each byte array is a json object on the order of a few kb. jackson-module-scala 2.2.2 runs roughly the same speed as jackson itself, but 2.2.3 is much slower.
Metadata
Metadata
Assignees
Labels
No labels