mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-11 09:27:00 +02:00
The RequestPipe uses a socketpair for streaming response body data from RequestServer to WebContent. On macOS, the default socket buffer size for AF_LOCAL sockets is only ~8KB, which meant every read/write syscall could only transfer ~8KB at a time. For large responses, this resulted in thousands of tiny reads with significant per-read overhead. Increase the send and receive buffer sizes to 512KB, matching the approach already used by IPC::TransportSocket. This dramatically improves throughput for large response bodies -- for example, fetching a 25MB file from localhost went from ~850ms to ~25ms in testing.
1.8 KiB
1.8 KiB