Closed tkurki closed 3 months ago
I pushed another version/commit, this one is clocking around 48k deltas/s. Now the object is copied.
The comment is a little confusing to me: all incoming properties are copied as is, but overridden by the other parameters and added, so not remove or add is not quite accurate for the original functionality.
This came up during a recent profiling session: there's a hotspot here, using the spread operator to create a new object.
With server processing an n2k file with the server with
"noThrottle": true
for thesimple
stream configuration, multiplexed file playback the baseline throughput was 35k deltas/s and with small change it jumped to 45k deltas/s, so not an insignificant change.I have not looked into any deeper: does this really need to construct a new object? Or can it just modify the incoming object? All tests pass, but I am really no expert with this codebase, so please have a deeper look.