-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Lease and non-boxing versions of Execute(Async) #2844
base: main
Are you sure you want to change the base?
Add Lease and non-boxing versions of Execute(Async) #2844
Conversation
…Explicit)(Async)) methods; can revert depending on feedback
Hey Monty; what's your timescales? Basically, I have a side branch that completely rewrites the fundamental writer/parser core, and one of the secondary aims is to enable zero-alloc custom commands from external callers. Assuming you're coming at this with your work hat on, we could perhaps use yourself as a 1st party client to give me an excuse to merge that work on company time. |
@mgravell It's short but not imminent - second week of February would be ideal. To expand on the use case, this is a benchmarking tool. I suspect the functionality that is being Execute'd is already fast enough, but cannot prove it. Based on profiling, I believe my extra tail latency is allocation / GC related. |
|
Considerations:
We're discussing this directly (off-GitHub), and will keep doing so. |
I've got a scenario where I need to do a ton of
.Execute(Async)
calls, and the lack of ways to avoid allocations are hurting.So I've added some.
Added methods (generally on both
IServer
andIDatabase(Async)
, as paired with existingExecute(Async)
methods):ExecuteLease(Async)
Lease<byte>?
(orTask<Lease<byte>?>
) - documented as only allowing simple string, bulk string, and integer returns per-LeaseProcessor
behaviorExecuteLeaseExplicit(Async)
params
ExcuteLease(Async)
methods except rather than taking anICollection<object>
it takes anICollection<RedisKey>
and anICollection<RedisValue>
Message
accordinglyRedisKey
values are not passed, they are only used to determine slots when cluster is enabledNotSupportException
s ifExecuteLeaseExplicit(Async)
methods are calledI'm not married to these exact methods, but they seem the simplest way to get Execute-ish functionality without boxing and while reusing result allocations.