Commit 48ed81f
src: improve StreamBase read throughput
Improve performance by providing JS with the raw ingridients
for the read data, i.e. an `ArrayBuffer` + offset + length
fields, instead of creating `Buffer` instances in C++ land.
PR-URL: #23797
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>1 parent 1cda41b commit 48ed81fCopy full SHA for 48ed81f
File tree
Expand file treeCollapse file tree
16 files changed
+115
-44
lines changedOpen diff view settings
Filter options
- benchmark/net
- lib/internal
- http2
- src
- test/parallel
Expand file treeCollapse file tree
16 files changed
+115
-44
lines changedOpen diff view settings
Collapse file
benchmark/net/tcp-raw-c2s.js
Copy file name to clipboardExpand all lines: benchmark/net/tcp-raw-c2s.js+4-4Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
46 | 46 | |
47 | 47 | |
48 | 48 | |
49 | | - |
| 49 | + |
50 | 50 | |
51 | 51 | |
52 | | - |
53 | | - |
| 52 | + |
| 53 | + |
54 | 54 | |
55 | 55 | |
56 | 56 | |
57 | | - |
| 57 | + |
58 | 58 | |
59 | 59 | |
60 | 60 | |
|
Collapse file
benchmark/net/tcp-raw-pipe.js
Copy file name to clipboardExpand all lines: benchmark/net/tcp-raw-pipe.js+8-8Lines changed: 8 additions & 8 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
43 | 43 | |
44 | 44 | |
45 | 45 | |
46 | | - |
| 46 | + |
47 | 47 | |
48 | 48 | |
49 | | - |
50 | | - |
| 49 | + |
| 50 | + |
51 | 51 | |
52 | 52 | |
53 | 53 | |
54 | | - |
| 54 | + |
55 | 55 | |
56 | 56 | |
57 | 57 | |
| ||
89 | 89 | |
90 | 90 | |
91 | 91 | |
92 | | - |
93 | | - |
94 | | - |
| 92 | + |
| 93 | + |
| 94 | + |
95 | 95 | |
96 | | - |
| 96 | + |
97 | 97 | |
98 | 98 | |
99 | 99 | |
|
Collapse file
benchmark/net/tcp-raw-s2c.js
Copy file name to clipboardExpand all lines: benchmark/net/tcp-raw-s2c.js+4-4Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
109 | 109 | |
110 | 110 | |
111 | 111 | |
112 | | - |
| 112 | + |
113 | 113 | |
114 | 114 | |
115 | | - |
116 | | - |
| 115 | + |
| 116 | + |
117 | 117 | |
118 | 118 | |
119 | 119 | |
120 | | - |
| 120 | + |
121 | 121 | |
122 | 122 | |
123 | 123 | |
|
Collapse file
lib/internal/child_process.js
Copy file name to clipboardExpand all lines: lib/internal/child_process.js+11-4Lines changed: 11 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
22 | 22 | |
23 | 23 | |
24 | 24 | |
25 | | - |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
26 | 31 | |
27 | 32 | |
28 | 33 | |
| ||
486 | 491 | |
487 | 492 | |
488 | 493 | |
489 | | - |
| 494 | + |
490 | 495 | |
491 | 496 | |
492 | | - |
493 | | - |
| 497 | + |
| 498 | + |
| 499 | + |
| 500 | + |
494 | 501 | |
495 | 502 | |
496 | 503 | |
|
Collapse file
+7-2Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
120 | 120 | |
121 | 121 | |
122 | 122 | |
123 | | - |
| 123 | + |
| 124 | + |
| 125 | + |
| 126 | + |
| 127 | + |
124 | 128 | |
125 | 129 | |
126 | 130 | |
| ||
2043 | 2047 | |
2044 | 2048 | |
2045 | 2049 | |
2046 | | - |
| 2050 | + |
| 2051 | + |
2047 | 2052 | |
2048 | 2053 | |
2049 | 2054 | |
|
Collapse file
lib/internal/stream_base_commons.js
Copy file name to clipboardExpand all lines: lib/internal/stream_base_commons.js+12-2Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | 2 | |
3 | 3 | |
4 | | - |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
5 | 11 | |
6 | 12 | |
7 | 13 | |
| ||
84 | 90 | |
85 | 91 | |
86 | 92 | |
87 | | - |
| 93 | + |
| 94 | + |
| 95 | + |
88 | 96 | |
89 | 97 | |
90 | 98 | |
91 | 99 | |
92 | 100 | |
93 | 101 | |
| 102 | + |
| 103 | + |
94 | 104 | |
95 | 105 | |
96 | 106 | |
|
Collapse file
+5Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
446 | 446 | |
447 | 447 | |
448 | 448 | |
| 449 | + |
| 450 | + |
| 451 | + |
| 452 | + |
| 453 | + |
449 | 454 | |
450 | 455 | |
451 | 456 | |
|
Collapse file
+1Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
158 | 158 | |
159 | 159 | |
160 | 160 | |
| 161 | + |
161 | 162 | |
162 | 163 | |
163 | 164 | |
|
Collapse file
+3Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
668 | 668 | |
669 | 669 | |
670 | 670 | |
| 671 | + |
671 | 672 | |
672 | 673 | |
673 | 674 | |
| ||
951 | 952 | |
952 | 953 | |
953 | 954 | |
| 955 | + |
| 956 | + |
954 | 957 | |
955 | 958 | |
956 | 959 | |
|
Collapse file
+1-4Lines changed: 1 addition & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1256 | 1256 | |
1257 | 1257 | |
1258 | 1258 | |
1259 | | - |
1260 | | - |
1261 | | - |
1262 | | - |
| 1259 | + |
1263 | 1260 | |
1264 | 1261 | |
1265 | 1262 | |
|
0 commit comments