mardi 26 janvier 2016

Is it normal that TypeTag object takes more than a second to initialize?

TypeTag when first referenced in code takes more than a second on my computer to be loaded and initialized.

The time can be measured by invoking the following code:

import scala.reflect.runtime.universe.TypeTag

object Boot extends App {
  val start = System.currentTimeMillis()
  TypeTag
  println(System.currentTimeMillis() - start)
}

Is it normal? If yes, what is the best way to initialize this object, should I reference it in some startup initialization code of my application? I've already experienced some vague timeouts because of this object being referenced for the first time in the application inner code.

I'm using scala 2.11.7.





Aucun commentaire:

Enregistrer un commentaire