Uses ~0.6x of the heap of PlayJson in exchange for undefined order of JsObject keys.
Shared values to reduce memory usage.
Convenience shims back to inefficient play-json formats.
Convenience shims back to inefficient play-json formats.
weePickle FromTo macros are more performant than using play-json Formats.
play-json always requires going through an intermediate heavyweight AST:
- JsValue
boxes every type. Extra allocations.
- JsObject
is full of hash maps which are less efficient than struct-like classes (both cpu and memory).
Uses ~0.6x of the heap of PlayJson in exchange for undefined order of JsObject keys. Ideal for
where order is irrelevant.
Heap usage for a particularly large JSON file captured from the wild:
Array[Byte]
play.Json.parse()
FromJson().transform(PlayJson)
(java.util.LinkedHashMap
initialCapacity=2)FromJson().transform(UnorderedPlayJson)
(Map1-4
+TreeMap
)FromJson().transform(UnorderedPlayJson)
(jsObjectEmpty +Map1-4
+TreeMap
)jsValue.as[T] }}}
Heap usage for a particularly large JSON file captured from the wild:
Array[Byte]
play.Json.parse()
FromJson().transform(PlayJson)
(java.util.LinkedHashMap
initialCapacity=2)FromJson().transform(UnorderedPlayJson)
(Map1-4
+TreeMap
)FromJson().transform(UnorderedPlayJson)
(jsObjectEmpty +Map1-4
+TreeMap
)