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
Per-command tracer overhead is a measurable fraction of redis
sub-millisecond latency. The following improvements are implemented:
1. Cache `{connectionOptions, connectionName}` per client; the lookup
was per-command despite being stable for the client's lifetime.
2. Pass the original command array with `argsStartIndex=1` in the v4
path so `formatCommand` iterates without a per-command slice.
3. `formatArg` short-circuits short strings; longer ones slice directly
to `97 + '...'`.
4. `wrapCallback` drops `shimmer.wrapFunction`; the wrapped callback is
internal.
5. Drop the redundant `try`/`catch` around ioredis `sendCommand`.
Bench (Node 24.13 / V8 13.6, n=1 M+ x 7 trials, drop best+worst):
formatArg always-trim 31.70 ns/op
formatArg short-string fast path 10.84 ns/op speedup: 2.92x
connectionInfo probe + WeakMap.get 6.58 ns/op
connectionInfo cached symbol-key 4.30 ns/op speedup: 1.53x
0 commit comments