Skip to content

pipe: enable writev for pipe handles on Unix

Rodrigo Muino Tomonari requested to merge github/fork/aqrln/pipe-cork into master

This PR enables writev for Unix Domain Sockets on supported platforms thus enabling cork/uncork functionality for them and increasing IPC performance.

Only those Unix-like systems that are confirmed to support the feature (Linux, macOS and FreeBSD) are explicitly listed in the define guard. If anyone has an opportunity to test it under other platforms supported by Node, the list should be expanded, inverted into list of platforms that do not support the feature or even changed to a simple Windows/Unix check.

It should fix #5095 (closed) and similar issues, but I haven't benchmarked this specific case and haven't prepared any public benchmarks yet. In my usecase it gives about 1.3–1.4x performance increase on Linux (but strangely the same performance on macOS).

UPD: after discussion on IRC and experiment on CI the patch is enabled on all platforms except Windows.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

pipe, stream_wrap

Merge request reports

Loading