aleph-im/pyaleph

Faster JSON using orjson ?

Closed this issue · 2 comments

hoh commented

https://pypi.org/project/orjson/

orjson is a fast, correct JSON library for Python. It benchmarks as the fastest Python library for JSON and is more correct than the standard json library or other third-party libraries. It serializes dataclass, datetime, numpy, and UUID instances natively.

orjson looks promising, but we'd need to check how well it plays with Pydantic models. At the moment, JSON serialization/deserialization is not identified as a performance issue though, so no rush in investigating this.

Integrated with the work on Postgres.