Skip to content

Optimize profiled XHTTP hot paths - #12

Merged
jacek4yang merged 1 commit into
mainfrom
perf/hot-path-optimizations
Aug 13, 2026
Merged

jacek4yang merged 1 commit into
mainfrom
perf/hot-path-optimizations

Conversation

@jacek4yang

Copy link
Copy Markdown
Owner

Summary

  • add a sustained PID-scoped hotspot profiler and bilingual analysis
  • remove request padding/path allocations and cache response padding headers
  • reduce session lock/timer teardown overhead and share authentication metadata
  • avoid redundant address formatting/resolution and inner Arc clones
  • bump the release version to 0.1.1

Measured results

Focused same-process Criterion comparisons:

  • borrowed path extraction/classification: 62.7 ns vs 103.2 ns (-39%)
  • request padding validation: 149.3 ns vs 383.7 ns (-61%)
  • cached response padding HeaderValue: 23.0 ns vs 118.2 ns (-81%)
  • shared lock-free VLESS lookup: 73.2 ns vs 90.3 ns (-19%)

An alternating A/B window before the final outer-Arc change measured -4.6% server CPU/op and -81% transient RSS growth. The final macro rerun was intentionally discarded because unrelated host workload began consuming CPU; the report does not present it as a capacity result.

Validation

  • scripts/gate.sh
  • bash scripts/m7_e2e.sh
  • cargo package --locked --allow-dirty
  • cargo deny check
  • cargo audit --no-fetch
  • XHTTP TLS/H2, placement, and compatibility suites during development

@jacek4yang
jacek4yang merged commit 903f137 into main Aug 13, 2026
2 checks passed
@jacek4yang
jacek4yang deleted the perf/hot-path-optimizations branch August 13, 2026 16:55
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