Commit 7a94b0a
committed
Avoid unnecessary yield if buffer has not fully accumulated yet
This reduces the number of yields from WebSocket to the stream parser by
accumulating self.reading_buffer_size worth of bytes before yielding.1 parent 0714fb2 commit 7a94b0a
1 file changed
Lines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
387 | 387 | | |
388 | 388 | | |
389 | 389 | | |
390 | | - | |
391 | | - | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
392 | 395 | | |
393 | 396 | | |
394 | | - | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
395 | 401 | | |
| 402 | + | |
396 | 403 | | |
397 | 404 | | |
398 | 405 | | |
| |||
0 commit comments