Always use SSLTransport_Transport when ktls is not requested - #56
Always use SSLTransport_Transport when ktls is not requested#56tarasko wants to merge 5 commits into
Conversation
Merging this PR will degrade performance by 14.01%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ❌ | test_benchmark_writelines[ssl_mbio-large] |
57.4 ms | 70.4 ms | -18.45% |
| ❌ | test_benchmark_write[ssl_mbio-buffered-large] |
94.1 ms | 106.6 ms | -11.72% |
| ❌ | test_benchmark_write[ssl_mbio-simple-large] |
93.4 ms | 105.8 ms | -11.68% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing refactor_ssltr (b9e8318) with master (de9feaf)
|
@codspeedbot explain why it is slower? |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #56 +/- ##
==========================================
- Coverage 90.97% 90.60% -0.37%
==========================================
Files 15 15
Lines 2913 2853 -60
Branches 17 17
==========================================
- Hits 2650 2585 -65
- Misses 257 262 +5
Partials 6 6
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
The whole regression is one extra memory copy on the write path, introduced by routing memory-BIO TLS through What the profiles show
That single new call site accounts for essentially the entire delta:
The function does not exist in the base profiles at all, and it does not appear in the WhyOn This PR always uses With large payloads the socket send buffer fills on almost every iteration, so nearly every encrypted chunk goes through that copy. With small payloads each The read side is unaffected: Options if you want to keep the simplification
Caveat on the numbersThe two runs landed on different runners (EPYC 7763 → 9V74), which the report flagged. That does not change the conclusion here: the delta is attributable to a specific new call site added by this diff, and its measured cost matches the reported slowdown to within a few hundred microseconds on all three benchmarks. No code changes were made — this was analysis only. Summary
Was this response helpful? React with 👍 or 👎 to help us improve CodSpeedBot. |
No description provided.