Skip to content

serialize: linearize iovec chunking for DATA frames#262

Merged
anmonteiro merged 1 commit into
masterfrom
perf/linearize-iovec-chunking
Mar 9, 2026
Merged

serialize: linearize iovec chunking for DATA frames#262
anmonteiro merged 1 commit into
masterfrom
perf/linearize-iovec-chunking

Conversation

@anmonteiro
Copy link
Copy Markdown
Owner

Summary

  • optimize Serialize.Writer.schedule_iovecs to advance an iovec cursor incrementally across DATA chunks
  • avoid repeatedly calling IOVec.shiftv from the original iovec list for each chunk
  • preserve frame splitting and END_STREAM semantics

Tests

  • add regression test fragmented request body chunking in lib_test/test_h2_client.ml
    • writes many fragmented body chunks
    • verifies emitted DATA payloads concatenate back to the original body
    • verifies body is split across multiple DATA frames

Validation

  • dune runtest --no-buffer

@anmonteiro anmonteiro force-pushed the perf/linearize-iovec-chunking branch 2 times, most recently from ccba20b to 4e75647 Compare March 9, 2026 01:17
@anmonteiro anmonteiro force-pushed the perf/linearize-iovec-chunking branch from 4e75647 to 42e67a3 Compare March 9, 2026 01:21
@anmonteiro anmonteiro merged commit 1b94b80 into master Mar 9, 2026
3 checks passed
@anmonteiro anmonteiro deleted the perf/linearize-iovec-chunking branch March 9, 2026 01:24
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.

1 participant