-
Notifications
You must be signed in to change notification settings - Fork 13
Closed
Labels
Description
We can cache the main implementations of the List and Map interfaces. Why only them, because all other converters are found immediately if we are talking about classical data types, such as String, Integer, etc.
Now, to encode an ArrayList in a MessagePack, we need to go this way:
- Search for a converter for
ArrayList
- not found - Search for a converter for the superclass
AbstractList
- not found - Search for a converter for the superclass
AbstractCollection
- not found - Search for a converter for the superclass
Object
- not found - Search for a converter for the
Collection
interface - not found - Search for a converter for the
Iterable
interface - not found - Search for a converter for the
List
interface - fount
We can add a caching converter ArrayList -> ArrayValue
, and do the same for HashMap
We can also think about how much we need this for LinkedList
and TreeMap