Skip to content

perf(http): use kernel zero-copy for TCP streams#196

Merged
0x676e67 merged 9 commits intomainfrom
perf
Oct 1, 2025
Merged

perf(http): use kernel zero-copy for TCP streams#196
0x676e67 merged 9 commits intomainfrom
perf

Conversation

@0x676e67
Copy link
Copy Markdown
Owner

@0x676e67 0x676e67 commented Oct 1, 2025

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements kernel zero-copy optimization for TCP streams across the HTTP and SOCKS modules to improve performance. The changes centralize the zero-copy logic and apply it consistently throughout the codebase.

  • Centralizes zero-copy logic in a new io module with platform-specific implementations
  • Updates HTTP module to use zero-copy for non-TLS connections while maintaining standard copy for TLS
  • Replaces inline platform-specific code in SOCKS module with centralized implementation

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/io.rs New module providing centralized zero-copy implementation with Linux/non-Linux fallback
src/main.rs Adds the new io module to the crate structure
src/server/http/mod.rs Updates HTTP handler to use zero-copy for non-TLS connections and adds TLS parameter threading
src/server/socks/mod.rs Replaces inline zero-copy logic with centralized implementation
src/server/auto.rs Updates type annotations to match new HTTP acceptor generic parameters

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread src/server/http/mod.rs Outdated
Comment thread src/server/auto.rs Outdated
@0x676e67 0x676e67 merged commit 4566060 into main Oct 1, 2025
7 checks passed
@0x676e67 0x676e67 deleted the perf branch October 1, 2025 16:36
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