Files
swift-nio-ssl/Sources
Cory Benfield 7aabfa3b64 Add support for shrinking massive ByteBufferBIOs (#443)
Motivation:

ByteBufferBIOs will grow their outbound buffer until flush is
called. They will retain their capacity at however large it got
to avoid reallocating, as they assume that your write pattern will
be fairly consistent.

In some cases this is a bad strategy, because it overcommits data.
To allow users to reclaim this data, we can add a configuration
option that will shrink the playload on the next write.

Modifications:

- Added support for ByteBufferBIO to shrink the payload.
- Plumbed up support for handler configuration.
- Tests that shrinkage actually works.

Result:

Users can reclaim memory.
2023-09-18 14:11:27 +01:00
..