-
Notifications
You must be signed in to change notification settings - Fork 18
[FEATURE] Speeding up JSON and pickle: to_dict() method #76
Copy link
Copy link
Open
Labels
Effort: MediumHow to waste a beautiful weekendHow to waste a beautiful weekendNeeds: DocImprovements or additions to documentationImprovements or additions to documentationNeeds: TestHey, it compiles! Ship it!Hey, it compiles! Ship it!Priority: HighA blocking bug or an important featureA blocking bug or an important featureType: EnhancementNew feature or requestNew feature or request
Metadata
Metadata
Assignees
Labels
Effort: MediumHow to waste a beautiful weekendHow to waste a beautiful weekendNeeds: DocImprovements or additions to documentationImprovements or additions to documentationNeeds: TestHey, it compiles! Ship it!Hey, it compiles! Ship it!Priority: HighA blocking bug or an important featureA blocking bug or an important featureType: EnhancementNew feature or requestNew feature or request
Currently, if you want to serialize a
frozendictto JSON, you have to convert it todict, even iffrozendictis aMapping. This is a limitation ofjsonbuiltin and third party modules.To mitigate speed problems, a
to_dict()method can be added. It will return a memcopy offrozendictinto a newdictobject. It should be much faster thandict(a_frozendict).This new method should also speed up
pickle.dumps(). Sincefrozendictcan be really useful in multiprocessing, this could be a nice bonus.