Skip to content

benchmark: pass timeout to stream.write#971

Merged
Kludex merged 1 commit into
pydantic:mainfrom
mbeijen:perf/benchmark-add-timeout
May 20, 2026
Merged

benchmark: pass timeout to stream.write#971
Kludex merged 1 commit into
pydantic:mainfrom
mbeijen:perf/benchmark-add-timeout

Conversation

@mbeijen
Copy link
Copy Markdown
Contributor

@mbeijen mbeijen commented May 19, 2026

Without it, send() drains the payload in one call and the buffer-slicing loop never iterates.

This is the reason our benchmark does not show an improvement for #954

Without it, send() drains the payload in one call and the
buffer-slicing loop never iterates.
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 19, 2026

Merging this PR will degrade performance by 99.79%

❌ 1 regressed benchmark
✅ 6 untouched benchmarks

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
WallTime test_bench_sync_stream_write_large 242.1 ms 114,880.9 ms -99.79%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing mbeijen:perf/benchmark-add-timeout (3d8f25c) with main (c1d3d95)

Open in CodSpeed

@Kludex Kludex merged commit ca874b3 into pydantic:main May 20, 2026
9 of 10 checks passed
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