You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The SDK is a foundational library on the hot path of transforms, generators,
checks, exports/imports, and every GraphQL round-trip — JSON encode/decode
throughput directly affects how fast SDK-based automation runs at scale.
Today the SDK relies on ujson (and stdlib json in places). orjson, backed
by Rust (serde_json), is substantially faster than both and stricter on
correctness, so adopting it would give a measurable, no-behaviour-change speedup
for users running large syncs and pipelines.
Context
This is a deliberate follow-up to tech-debt: standardize JSON library usage (json vs ujson) across the SDK #1165 (JSON library standardization). That
issue picks a single library across the codebase; this one proposes making
that target orjson rather than settling on ujson. Sequencing/merging the
two is up to whoever picks them up.
Adding orjson is a new runtime dependency — flagged here because the repo
asks to confirm dependency additions.
Known migration constraints the implementer will hit (not a design, just
gotchas): orjson.dumps() returns bytes rather than str, so str(...) / .encode() wrappers at call sites like playback.py:52 and utils.py:253
change; and orjson has no sort_keys= kwarg (it uses option=orjson.OPT_SORT_KEYS), which dict_hash (utils.py:253) depends on.
Need
The SDK is a foundational library on the hot path of transforms, generators,
checks, exports/imports, and every GraphQL round-trip — JSON encode/decode
throughput directly affects how fast SDK-based automation runs at scale.
Today the SDK relies on
ujson(and stdlibjsonin places).orjson, backedby Rust (
serde_json), is substantially faster than both and stricter oncorrectness, so adopting it would give a measurable, no-behaviour-change speedup
for users running large syncs and pipelines.
Context
issue picks a single library across the codebase; this one proposes making
that target
orjsonrather than settling onujson. Sequencing/merging thetwo is up to whoever picks them up.
orjsonis a new runtime dependency — flagged here because the repoasks to confirm dependency additions.
gotchas):
orjson.dumps()returnsbytesrather thanstr, sostr(...)/.encode()wrappers at call sites likeplayback.py:52andutils.py:253change; and
orjsonhas nosort_keys=kwarg (it usesoption=orjson.OPT_SORT_KEYS), whichdict_hash(utils.py:253) depends on.References