Commit 6625a27
authored
refactor: remove abortable iterator (#2237)
We use an `abortable-iterator` to race an abort signal against an
incoming for streams and connections so we do not wait on slow connections
forever.
Unfortunately this introduces so much latency it becomes a performance
bottleneck, and in all cases we can just add an `abort` listener to the
incoming abort signal and close the underlying stream if it fires.
Removing the latency added by the abortable iterator reveals that tests using
it-pair, it-pushable and friends have many timing issues so it's necessary
to ensure we are supplying data to streams as it is required.
This opens up the possibility of having backpressure applied to protocol
streams by the underlying transports which isn't currently possible.1 parent 9c67c5b commit 6625a27
File tree
75 files changed
+1705
-1620
lines changed- packages
- integration-tests/test
- interface-compliance-tests
- src
- connection-encryption/utils
- mocks
- stream-muxer
- test/mocks
- interface
- src
- connection
- stream-muxer
- kad-dht
- src
- message
- test
- libp2p
- src
- connection-manager
- connection
- test
- connection-manager
- connection
- upgrading
- multistream-select
- src
- test
- protocol-fetch/src
- protocol-identify/test
- fixtures
- protocol-perf
- src
- pubsub
- src
- stream-multiplexer-mplex
- benchmark
- src
- test
- transport-circuit-relay-v2
- src/transport
- test
- transport-tcp/src
- transport-webrtc
- src
- private-to-private
- test
- transport-websockets
- src
- transport-webtransport/src
- utils
- src
- test
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
75 files changed
+1705
-1620
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
502 | 503 | | |
503 | 504 | | |
504 | 505 | | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
510 | 512 | | |
511 | | - | |
| 513 | + | |
| 514 | + | |
512 | 515 | | |
513 | 516 | | |
514 | 517 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
15 | 18 | | |
16 | 19 | | |
17 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
116 | 117 | | |
117 | 118 | | |
118 | 119 | | |
119 | | - | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | | - | |
| 18 | + | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| |||
Lines changed: 0 additions & 113 deletions
This file was deleted.
Lines changed: 51 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | | - | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| 48 | + | |
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
| |||
67 | 69 | | |
68 | 70 | | |
69 | 71 | | |
| 72 | + | |
70 | 73 | | |
71 | 74 | | |
72 | 75 | | |
| |||
139 | 142 | | |
140 | 143 | | |
141 | 144 | | |
142 | | - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
143 | 148 | | |
144 | 149 | | |
145 | 150 | | |
| |||
185 | 190 | | |
186 | 191 | | |
187 | 192 | | |
188 | | - | |
| 193 | + | |
| 194 | + | |
189 | 195 | | |
190 | 196 | | |
191 | 197 | | |
| 198 | + | |
192 | 199 | | |
193 | 200 | | |
194 | 201 | | |
| |||
199 | 206 | | |
200 | 207 | | |
201 | 208 | | |
202 | | - | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
203 | 220 | | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
208 | 247 | | |
209 | 248 | | |
210 | 249 | | |
| |||
215 | 254 | | |
216 | 255 | | |
217 | 256 | | |
| 257 | + | |
218 | 258 | | |
219 | 259 | | |
| 260 | + | |
| 261 | + | |
220 | 262 | | |
221 | 263 | | |
222 | 264 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
4 | 3 | | |
| |||
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
52 | | - | |
| 54 | + | |
| 55 | + | |
53 | 56 | | |
54 | 57 | | |
55 | 58 | | |
| |||
65 | 68 | | |
66 | 69 | | |
67 | 70 | | |
68 | | - | |
| 71 | + | |
| 72 | + | |
69 | 73 | | |
70 | 74 | | |
71 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
252 | | - | |
| 252 | + | |
253 | 253 | | |
254 | | - | |
255 | | - | |
256 | | - | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
257 | 263 | | |
258 | | - | |
259 | | - | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
260 | 273 | | |
261 | 274 | | |
262 | 275 | | |
| |||
0 commit comments