Skip to content

Remove large serialisation inefficiency #250

Open
@cortadocodes

Description

@cortadocodes

Current situation

Currently when we serialise Serialisable instances to a dictionary of python primatives, we go through a json.dumps call followed by a json.loads call with our custom encoder and decoder to ensure nested attributes that are e.g. datetime instances, sets or any of our own class instances with their own serialise methods are converted to a JSON-compatible form. Another reason we do this is to validate outbound information the same way as we validate incoming information. This is, however, slow and inefficient.

Proposed solution

A more performant method would be to implement an encoder which returns python primitives, not strings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendRelated to the back enddecision neededA decision is required (e.g. on UX or company policy)performanceIf you want to run cool, you've got to run on heavy, heavy fuel

    Type

    No type

    Projects

    Status

    Priority 1 (Low)

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions