Skip to content

Faster libraries: orjson and uuid_utils #661

Open
@ff137

Description

@ff137

Proposed change

Good day

I'd like to propose additional optional dependencies for faster performance.

orjson is widely adopted and outperforms the built-in json library - https://github.com/ijl/orjson
.loads being 2x faster and .dumps 10x faster

uuid-utils is 10x faster than uuid - https://github.com/aminalaee/uuid-utils
^ My only reason for proposing this is after seeing it used in Subscription.next_msg(): task_name = str(uuid4()) (only place it's used)

I understand if you don't want these to replace the built-in default libraries, so I wonder if optional dependencies are the best way to add it.

Either way, I think these will make significant performance improvements to the library (relatively speaking, it's already very fast)

Let me know what you think

Use case

Faster performance

Contribution

I can contribute this feature - just need to know the desired implementation (optional dependency vs built-in), and if they are separate extras or can be included together (they both use rust bindings).

Metadata

Metadata

Assignees

No one assigned

    Labels

    proposalEnhancement idea or proposal

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions