-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: use buffered connections for I/O #32
Conversation
🔥 Run benchmarks comparing 9874501 against gh workflow run bench.yaml -f pr_number=32 Note: this comment will update with each new commit. |
benchstats: 4e63a4d...64372fcView full benchmark output on the workflow summary.
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #32 +/- ##
==========================================
- Coverage 79.62% 79.23% -0.40%
==========================================
Files 3 3
Lines 432 443 +11
==========================================
+ Hits 344 351 +7
- Misses 64 66 +2
- Partials 24 26 +2 ☔ View full report in Codecov by Sentry. |
9e19bb5
to
fa0d4c2
Compare
Forcing reads/writes through bufio.ReadWriter should reduce syscalls.
fa0d4c2
to
9874501
Compare
Gonna give up on this path for now, may revisit in the future. For posterity, I'm not sure how best to reason about directing all reads and writes through a buffered wrapper and how that impacts connection state and error handling. As a concrete example, I don't know how to make a test like this — which attempts to exercise one aspect of handling write errors, and which works well with a "plain" net.Conn — when dealing with a combination of a buffered writer and an underlying connection: Lines 656 to 703 in 9874501
|
Force the use of buffered I/O via bufio.ReadWriter to hopefully make reads/writes more efficient. Extracted from #23, which may or may not pan out.