Skip to content

small optimization for encode #41

@flip111

Description

@flip111

Could the following two lines of code be switched around ?

$ FO.insert e.tagKey (fromString (reflectSymbol (Proxy :: Proxy name)))
$ FO.insert e.valuesKey values

Reason being that right now values come first in the encoded json and tag later. But for decoding it can potentially be faster to first get the tag to get of the type (FP) or class (OO) that the values have to be deserialized into.

Also for debugging it's nicer to see tag first and (potentially long) value string after that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions