- Notifications
You must be signed in to change notification settings - Fork516
Commitca6d4b8
committed
tokio-postgres: buffer sockets to avoid excessive syscalls
The current implementation forwards all read requests to the operatingsystem through the socket causing excessive system calls. The effect ismagnified when the underlying Socket is wrapped around a TLSimplementation.This commit changes the underlying socket to be read-buffered by defaultwith a buffer size of 16K, following the implementation of the officialclient.Signed-off-by: Petros Angelatos <petrosagg@gmail.com>1 parent52de269 commitca6d4b8
2 files changed
+6
-4
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
51 | 51 |
| |
52 | 52 |
| |
53 | 53 |
| |
54 |
| - | |
| 54 | + | |
55 | 55 |
| |
56 | 56 |
| |
57 | 57 |
| |
| |||
115 | 115 |
| |
116 | 116 |
| |
117 | 117 |
| |
| 118 | + | |
118 | 119 |
| |
119 | 120 |
| |
120 | 121 |
| |
| |||
126 | 127 |
| |
127 | 128 |
| |
128 | 129 |
| |
129 |
| - | |
| 130 | + | |
130 | 131 |
| |
131 | 132 |
| |
132 | 133 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
57 | 57 |
| |
58 | 58 |
| |
59 | 59 |
| |
60 |
| - | |
| 60 | + | |
61 | 61 |
| |
62 | 62 |
| |
63 | 63 |
| |
| |||
140 | 140 |
| |
141 | 141 |
| |
142 | 142 |
| |
| 143 | + | |
143 | 144 |
| |
144 | 145 |
| |
145 | 146 |
| |
| |||
182 | 183 |
| |
183 | 184 |
| |
184 | 185 |
| |
185 |
| - | |
| 186 | + | |
186 | 187 |
| |
187 | 188 |
| |
188 | 189 |
| |
|
0 commit comments
Comments
(0)