Commit bf17f8d
src: optimize ALPN callback
It doesn't make sense from a performance perspective to retain an
arraybuffer with the ALPN byte string and look it up as a property on
the JS context object for every TLS handshake.
Store the byte string in the C++ TLSWrap object instead. That's both
a lot faster and a lot simpler.
PR-URL: #44875
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>1 parent d433d34 commit bf17f8dCopy full SHA for bf17f8d
File tree
Expand file treeCollapse file tree
5 files changed
+19
-35
lines changedOpen diff view settings
Filter options
- lib
- src
- crypto
- typings/internalBinding
Expand file treeCollapse file tree
5 files changed
+19
-35
lines changedOpen diff view settings
Collapse file
+2-5Lines changed: 2 additions & 5 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
786 | 786 | |
787 | 787 | |
788 | 788 | |
789 | | - |
790 | | - |
791 | | - |
792 | | - |
793 | | - |
| 789 | + |
| 790 | + |
794 | 791 | |
795 | 792 | |
796 | 793 | |
|
Collapse file
+13-28Lines changed: 13 additions & 28 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
225 | 225 | |
226 | 226 | |
227 | 227 | |
228 | | - |
229 | | - |
230 | | - |
231 | | - |
| 228 | + |
| 229 | + |
232 | 230 | |
233 | | - |
234 | | - |
235 | | - |
236 | | - |
237 | | - |
238 | | - |
| 231 | + |
239 | 232 | |
240 | | - |
241 | | - |
242 | | - |
243 | | - |
244 | | - |
245 | | - |
246 | | - |
247 | | - |
| 233 | + |
| 234 | + |
| 235 | + |
| 236 | + |
| 237 | + |
| 238 | + |
248 | 239 | |
249 | 240 | |
250 | 241 | |
| ||
1529 | 1520 | |
1530 | 1521 | |
1531 | 1522 | |
| 1523 | + |
1532 | 1524 | |
1533 | 1525 | |
1534 | | - |
1535 | 1526 | |
1536 | 1527 | |
1537 | | - |
1538 | | - |
1539 | | - |
1540 | | - |
1541 | | - |
1542 | | - |
1543 | | - |
1544 | | - |
1545 | | - |
| 1528 | + |
| 1529 | + |
| 1530 | + |
1546 | 1531 | |
1547 | 1532 | |
1548 | 1533 | |
|
Collapse file
+4Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
34 | 34 | |
35 | 35 | |
36 | 36 | |
| 37 | + |
37 | 38 | |
38 | 39 | |
39 | 40 | |
| ||
283 | 284 | |
284 | 285 | |
285 | 286 | |
| 287 | + |
| 288 | + |
| 289 | + |
286 | 290 | |
287 | 291 | |
288 | 292 | |
|
Collapse file
-1Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
18 | 18 | |
19 | 19 | |
20 | 20 | |
21 | | - |
22 | 21 | |
23 | 22 | |
24 | 23 | |
|
Collapse file
typings/internalBinding/util.d.ts
Copy file name to clipboardExpand all lines: typings/internalBinding/util.d.ts-1Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
9 | 9 | |
10 | 10 | |
11 | 11 | |
12 | | - |
13 | 12 | |
14 | 13 | |
15 | 14 | |
|
0 commit comments