Skip to content
This repository has been archived by the owner on Feb 20, 2019. It is now read-only.

Commit

Permalink
Fix performance issue (generation of Pickler[Any])
Browse files Browse the repository at this point in the history
* When generating (un)picklers, most of the time we look for the pickler
  of `Any`. By exposing the pickler of `Any`, we don't manually create
  one pickler/unpickler every time it's needed. This speeds up the
  compilation time almost by a factor of 2.
  • Loading branch information
jvican committed Apr 18, 2016
1 parent eaa7c2a commit 7d3a7ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/scala/scala/pickling/pickler/Any.scala
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@ object AnyPicklerUnpickler extends AbstractPicklerUnpickler[Any]
}

trait AnyUnpicklers {
implicit val anyUnpickler: Unpickler[Any] = AnyPicklerUnpickler
implicit val anyPicklerUnpickler: AbstractPicklerUnpickler[Any] = AnyPicklerUnpickler
}

0 comments on commit 7d3a7ac

Please sign in to comment.