Skip to content

RFC: ObjectConverters search optimization #207

@ArtDu

Description

@ArtDu

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:

  1. Search for a converter for ArrayList - not found
  2. Search for a converter for the superclass AbstractList - not found
  3. Search for a converter for the superclass AbstractCollection - not found
  4. Search for a converter for the superclass Object - not found
  5. Search for a converter for the Collection interface - not found
  6. Search for a converter for the Iterable interface - not found
  7. 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions