Skip to content

Why deepcopy __dict__ to serialize to json? #16

Description

The deepcopy of the instance __dict__ during serialization at the following line seems unnecessary:

dict = copy.deepcopy(dict)

I have benchmarked this and it is also a serious bottleneck when serializing large objects. Is there a reason behind creating a deep copy here instead of a shallow copy?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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