Skip to content

schannel: reuse the send buffer - #22540

Closed
hunterinvariants wants to merge 1 commit into
curl:masterfrom
hunterinvariants:schannel-reuse-send-buffer
Closed

hunterinvariants wants to merge 1 commit into
curl:masterfrom
hunterinvariants:schannel-reuse-send-buffer

Conversation

@hunterinvariants

Copy link
Copy Markdown
Contributor

Reuse a connection-local buffer for encrypted Schannel writes instead of allocating and freeing a buffer for every send. Grow it when needed and release it when the connection is closed.

In a native Windows debug build, 30 sequential HTTPS transfers over one reused connection changed the send-buffer heap activity from 30 allocations and 30 frees to one allocation and one close-time free.

Verified with checksrc, MinGW 32-bit and 64-bit Schannel builds, and native Windows 11 Schannel runs.

@github-actions github-actions Bot added TLS Windows Windows-specific labels Aug 11, 2026
@hunterinvariants

Copy link
Copy Markdown
Contributor Author

One CI job was cancelled at the 15-minute limit: mingw, AM ucrt-x86_64 wolfssl c-ares U. This configuration does not exercise the Schannel code changed by this PR. The other 212 checks, including the Windows Schannel jobs, passed.

Could someone with workflow permissions rerun the cancelled job?

@jay jay closed this in 419f640 Aug 11, 2026
@jay

jay commented Aug 11, 2026

Copy link
Copy Markdown
Member

Thanks

@hunterinvariants
hunterinvariants deleted the schannel-reuse-send-buffer branch August 11, 2026 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

TLS Windows Windows-specific

Development

Successfully merging this pull request may close these issues.

2 participants