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
{{ message }}
Repository navigation
Perf: snapshot apply walks the level list twice (validate tuples, then rebuild dict) #263
OrderbookSnapshotMessage.model_validate already builds a list[tuple[Decimal, Decimal]] (one allocation per level); dict(msg.msg.yes) then re-iterates that list to build a dict (a second per-level Python-level walk). For a 200-level book that's 400 redundant tuple unpacks per snapshot. Snapshots are infrequent vs deltas so this is medium, not high.
Make OrderbookSnapshotPayload validate yes/no directly into dict[Decimal, Decimal] via a BeforeValidator, or expose a .as_dict() cache so _apply_snapshot_inplace doesn't iterate twice.
Activity
perf(ws): collapse snapshot apply into a single dict walk (#263) (#282)
fix(ws): release orphan subscribe acks; require snapshot yes/no (#268) (
fix-up(ws): trim snapshot-adopt comment
perf(ws): adopt orderbook snapshot dicts by identity (#296) (#306)