Skip to content

refactor(vanilla-epoll): extract shared emit_xcache helper for io_uring parity#968

Open
enghitalo wants to merge 1 commit into
MDA2AV:mainfrom
enghitalo:refactor/vanilla-epoll-shared-emit-xcache
Open

refactor(vanilla-epoll): extract shared emit_xcache helper for io_uring parity#968
enghitalo wants to merge 1 commit into
MDA2AV:mainfrom
enghitalo:refactor/vanilla-epoll-shared-emit-xcache

Conversation

@enghitalo

Copy link
Copy Markdown
Contributor

What & why

Small maintainability refactor, paired with the vanilla-io_uring convergence PR. vanilla-epoll inlined the crud X-Cache response framing in two places (the crud GET cache hit and miss paths). This folds both into one emit_xcache helper.

The helper is byte-identical to the code it replaces, and identical to the emit_xcache now used by the vanilla-io_uring twin — so both entries share one audited X-Cache framing and diff cleanly. vanilla-epoll remains the performance reference; this only removes duplication.

Supersedes #966 (same change, rebased clean onto current main).

Change

  • Add emit_xcache(mut out, ctype, body, cache) next to emit / write_resp.
  • Use it in start_crud_get (HIT) and render_crud_get (MISS).

No behavior or performance change.

Validation

Verified against a seeded Postgres that the crud GET MISS and HIT responses are byte-for-byte unchanged (and identical to the vanilla-io_uring twin, whose full-route byte-diff is in its PR).

🤖 Generated with Claude Code

…-Cache framing

Fold the two inlined X-Cache response framings (crud GET hit/miss) into one emit_xcache
helper — byte-identical output, and identical to the vanilla-io_uring twin's emit_xcache,
so both entries share one audited framing and diff cleanly. No behavior or performance
change (verified: crud GET MISS/HIT bytes unchanged).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@enghitalo

Copy link
Copy Markdown
Contributor Author

/benchmark -f vanilla-epoll

@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

👋 /benchmark request received. A collaborator will review and approve the run.

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