Commit 13a870c
authored
fix: disable Nagle's algorithm by default (#2242)
By default Node.js enables Nagle's algorithm. This adds a small
delay when sending tiny buffers to batch-send them later.
Unfortunately this makes protocol negotiation slower as the
protocol strings are small enough to be batch sent.
The change here is to turn it off by default, this reduces the
perf test connection establisment from 1.2s to 0.8s.
See the latency measurements in the "Connection Establishment"
test [on this run](https://observablehq.com/@libp2p-workspace/performance-dashboard?branch=cac8364ac83a4d8856851687a605e50b1e3855fb)
for an example.1 parent 2557fc2 commit 13a870c
2 files changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
| 185 | + | |
185 | 186 | | |
186 | 187 | | |
187 | 188 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
| |||
0 commit comments