BufferPool Module
Dedicated byte ArrayPool isolated from System.Buffers.ArrayPool.Shared. Rationale: ArrayPool.Shared is process-wide and contended by every library running in the host (the BCL itself, ASP.NET if hosted side-by-side, JSON serialisers, gzip streams, …). Under high concurrency, even though Shared has thread-local caches, the cross-bucket fall-through paths take locks that show up in profiles. By renting Suave's per-connection buffers (line buffer, header read buffer, header-name lowercase scratch) from a pool we own, we keep our hot-path rentals out of that shared contention surface entirely. Tuning: ArrayPool.Create defaults are 1MB max length, 50 arrays per bucket. Suave's typical rentals are 8KiB and 256B; the defaults are appropriate.
Functions and values
| Function or value | Description |
|
|
Full Usage:
rent size
Parameters:
int
Returns: byte[]
Modifiers: inline |
|
Full Usage:
returnArray buf clearArray
Parameters:
byte[]
clearArray : bool
Modifiers: inline |