Skip to content

[FEATURE] Speeding up JSON and pickle: to_dict() method #76

@Marco-Sulla

Description

@Marco-Sulla

Currently, if you want to serialize a frozendict to JSON, you have to convert it to dict, even if frozendict is a Mapping. This is a limitation of json builtin and third party modules.

To mitigate speed problems, a to_dict() method can be added. It will return a memcopy of frozendict into a new dict object. It should be much faster than dict(a_frozendict).

This new method should also speed up pickle.dumps(). Since frozendict can be really useful in multiprocessing, this could be a nice bonus.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Effort: MediumHow to waste a beautiful weekendNeeds: DocImprovements or additions to documentationNeeds: TestHey, it compiles! Ship it!Priority: HighA blocking bug or an important featureType: EnhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions