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
I'm not sure why it was only conditionally updating the values before
because running the comparisons as `if` checks is slower than just
always replacing fields with the new values each time.
The only edge cases this would impact is if instruments received many
last trades all of the same price and size (3x3, 5x5, 5x5, 5x5) after
each other, the previous way would always show previousPrice/Size as 3x3
until a new value was received, but that's also a lie because the
_previous_ reported trade was the _same_ as the current trade.
Now this is both more accurate to the truth (especially since we have
`lastTimestamp` being reported from the API now) and faster since it
isn't doing multiple comparisons to just set the same fields each time.
0 commit comments