Skip to content

Conversation

@Rob-Hague
Copy link
Collaborator

An SFTP download performs several reads from the server in parallel, allocating an array to store each result until it's ready to be consumed. Since these buffers are short-lived and normally of the same large-ish size (32KB), it seems like a good candidate for pooling.

In a test download, I see 3 or 4 such buffers allocated in the pool (~100KB), instead of e.g. 1MB or 8MB of arrays allocated (corresponding to the size of the file) at this layer.

An SFTP download performs several reads from the server in parallel, allocating an array
to store each result until it's ready to be consumed. Since these buffers are short-lived
and normally of the same large-ish size (32KB), it seems like a good candidate for pooling.
@Rob-Hague Rob-Hague merged commit bafd867 into sshnet:develop Nov 21, 2025
6 checks passed
@Rob-Hague Rob-Hague deleted the memoryowner branch November 21, 2025 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants