add ResponseArrayPool#3104
Conversation
|
The change - static StackExchange.Redis.Lease<T>.Create(int length, bool clear = true) -> StackExchange.Redis.Lease<T>!
+static StackExchange.Redis.Lease<T>.Create(int length, bool clear = true, System.Buffers.ArrayPool<T>? pool = null) -> StackExchange.Redis.Lease<T>!is a hard "nope" - that would smash binary compatibility; at the minimum, we would need to add this via an overload. However, I wonder whether we should instead allow the least to be backed by a union of |
perfect! |
|
I have updated Lease, but I am having trouble passing the IMemoryOwner object to the ResultProcessor<Lease> |
|
I can look tomorrow, but I assume it would be accessing the muxer via the connection to get the options, to pass into a new overload of AsLease |
|
ok, I have a plan here; merging this into my branch and evolving |
13cc1b7
into
StackExchange:marc/cyclebufferpool
|
new approach summary (please weigh in here!)
Does that cover all bases? |
I like. But I have a few comments:
-var memoryPool = BridgeCouldBeNull?.Multiplexer.RawConfig.ResponseMemoryPool ?? MemoryPool<byte>.Shared;
+var memoryPool = BridgeCouldBeNull?.Multiplexer.RawConfig.RequestBufferPool ?? MemoryPool<byte>.Shared;
|
|
1 yep, typo, thanks 2 I'll have to read when at a computer, my brain can't parse in isolation |
OK. I think the current changes are sufficient for a release. When can we expect a new version? |
|
typo fixed; re 2 - there's two different concepts here; can I check we're not talking past each-other? The On releases: I'll see if I can get a point release out today |
Yes, you are right. I didn't know that the scenario of getting a large buffer from a sequence of segments is rare.
Great! |
* - introduce CycleBufferPool as a concept that encapsulates MemoryPool<byte> with the growth logic - support `-d` in the benchmark * - add ConfigurationOptions support - add [SkipLocalsInit] to RESPite * add ResponseArrayPool (#3104) * add ResponseArrayPool * Lease * IMemoryOwner<byte>? --------- Co-authored-by: ITikhonov <[email protected]> * refactor API so that MemoryPool<T> can be used throughout, and shared between lease and cycle-buffers * we don't actually need a default CycleBufferPool<T> impl; * fix typo * avoid `Failed` nomenclature in tests - makes it hard to isolate CI problems --------- Co-authored-by: Ivan Tikhonov <[email protected]> Co-authored-by: ITikhonov <[email protected]>
No description provided.