Change ordering of fields in ETF encoded events #7977
Unanswered
Ruttie2006
asked this question in
API Feature Requests & Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Currently ETF encoded gateway events are sent with the d, op, s and t fields in arbitrary order.
In practice, I always encounter the fields in the d, op, s, t order.
Because the type of the d field can only be determined by the op and t fields, decoding of the event requires skipping the d field (possibly transcoding it into a temporary representation), then reading the op and t fields, only to then decode the d field once more with actual type info.
This makes decoding rather wasteful, because you effectively have to decode the event twice.
Ideally the fields would have the d field occur last, with the order of the fields being a guarantee rather than a guess.
Beta Was this translation helpful? Give feedback.
All reactions