Commit a936eae
src: speed up process.getActiveResourcesInfo()
This change reduces the number of calls that were crossing the JS-C++
boundary to 1 and also removes the need for calling Array::New()
multiple times internally and ArrayPrototypeConcat-ing the results
later on, thus improving performance.
Refs: #44445 (review)
Signed-off-by: Darshan Sen <raisinten@gmail.com>
PR-URL: #46014
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>1 parent 38dd506 commit a936eaeCopy full SHA for a936eae
File tree
Expand file treeCollapse file tree
9 files changed
+103
-50
lines changedOpen diff view settings
Filter options
- benchmark/process
- lib/internal
- bootstrap
- src
Expand file treeCollapse file tree
9 files changed
+103
-50
lines changedOpen diff view settings
Collapse file
benchmark/process/getActiveResourcesInfo.js
Copy file name to clipboard+45Lines changed: 45 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
Collapse file
lib/internal/bootstrap/node.js
Copy file name to clipboardExpand all lines: lib/internal/bootstrap/node.js+1-12Lines changed: 1 addition & 12 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
55 | 55 | |
56 | 56 | |
57 | 57 | |
58 | | - |
59 | | - |
60 | | - |
61 | 58 | |
62 | 59 | |
63 | 60 | |
| ||
159 | 156 | |
160 | 157 | |
161 | 158 | |
162 | | - |
163 | | - |
164 | | - |
165 | | - |
166 | | - |
167 | | - |
168 | | - |
169 | | - |
170 | | - |
| 159 | + |
171 | 160 | |
172 | 161 | |
173 | 162 | |
|
Collapse file
+11-14Lines changed: 11 additions & 14 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
86 | 86 | |
87 | 87 | |
88 | 88 | |
| 89 | + |
89 | 90 | |
90 | 91 | |
91 | 92 | |
| ||
136 | 137 | |
137 | 138 | |
138 | 139 | |
139 | | - |
| 140 | + |
| 141 | + |
| 142 | + |
| 143 | + |
| 144 | + |
140 | 145 | |
141 | 146 | |
142 | 147 | |
| ||
301 | 306 | |
302 | 307 | |
303 | 308 | |
304 | | - |
| 309 | + |
305 | 310 | |
306 | 311 | |
307 | 312 | |
308 | 313 | |
309 | | - |
| 314 | + |
310 | 315 | |
311 | 316 | |
312 | 317 | |
| ||
497 | 502 | |
498 | 503 | |
499 | 504 | |
500 | | - |
| 505 | + |
501 | 506 | |
502 | 507 | |
503 | 508 | |
| ||
543 | 548 | |
544 | 549 | |
545 | 550 | |
546 | | - |
| 551 | + |
547 | 552 | |
548 | 553 | |
549 | 554 | |
| ||
571 | 576 | |
572 | 577 | |
573 | 578 | |
574 | | - |
| 579 | + |
575 | 580 | |
576 | 581 | |
577 | 582 | |
| ||
642 | 647 | |
643 | 648 | |
644 | 649 | |
645 | | - |
646 | | - |
647 | | - |
648 | | - |
649 | | - |
650 | | - |
651 | | - |
652 | 650 | |
653 | 651 | |
654 | 652 | |
| ||
675 | 673 | |
676 | 674 | |
677 | 675 | |
678 | | - |
679 | 676 | |
Collapse file
+4Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
323 | 323 | |
324 | 324 | |
325 | 325 | |
| 326 | + |
| 327 | + |
| 328 | + |
| 329 | + |
326 | 330 | |
327 | 331 | |
328 | 332 | |
|
Collapse file
+4Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
654 | 654 | |
655 | 655 | |
656 | 656 | |
| 657 | + |
657 | 658 | |
658 | 659 | |
659 | 660 | |
| ||
1593 | 1594 | |
1594 | 1595 | |
1595 | 1596 | |
| 1597 | + |
1596 | 1598 | |
1597 | 1599 | |
1598 | 1600 | |
| ||
1638 | 1640 | |
1639 | 1641 | |
1640 | 1642 | |
| 1643 | + |
1641 | 1644 | |
1642 | 1645 | |
1643 | 1646 | |
| ||
1835 | 1838 | |
1836 | 1839 | |
1837 | 1840 | |
| 1841 | + |
1838 | 1842 | |
1839 | 1843 | |
1840 | 1844 | |
|
Collapse file
+3Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
465 | 465 | |
466 | 466 | |
467 | 467 | |
| 468 | + |
468 | 469 | |
469 | 470 | |
470 | 471 | |
| ||
676 | 677 | |
677 | 678 | |
678 | 679 | |
| 680 | + |
679 | 681 | |
680 | 682 | |
681 | 683 | |
| ||
997 | 999 | |
998 | 1000 | |
999 | 1001 | |
| 1002 | + |
1000 | 1003 | |
1001 | 1004 | |
1002 | 1005 | |
|
Collapse file
src/node_process_methods.cc
Copy file name to clipboardExpand all lines: src/node_process_methods.cc+26-24Lines changed: 26 additions & 24 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
259 | 259 | |
260 | 260 | |
261 | 261 | |
262 | | - |
263 | | - |
264 | | - |
265 | | - |
266 | | - |
267 | | - |
268 | | - |
269 | | - |
270 | | - |
271 | | - |
272 | | - |
273 | | - |
274 | | - |
275 | | - |
276 | | - |
277 | 262 | |
278 | 263 | |
279 | 264 | |
| ||
289 | 274 | |
290 | 275 | |
291 | 276 | |
292 | | - |
| 277 | + |
293 | 278 | |
| 279 | + |
| 280 | + |
| 281 | + |
| 282 | + |
| 283 | + |
| 284 | + |
| 285 | + |
| 286 | + |
| 287 | + |
294 | 288 | |
295 | | - |
| 289 | + |
296 | 290 | |
297 | 291 | |
298 | | - |
299 | | - |
| 292 | + |
| 293 | + |
300 | 294 | |
301 | 295 | |
| 296 | + |
| 297 | + |
| 298 | + |
| 299 | + |
| 300 | + |
| 301 | + |
| 302 | + |
| 303 | + |
| 304 | + |
| 305 | + |
302 | 306 | |
303 | | - |
| 307 | + |
304 | 308 | |
305 | 309 | |
306 | 310 | |
| ||
583 | 587 | |
584 | 588 | |
585 | 589 | |
586 | | - |
587 | 590 | |
588 | 591 | |
589 | | - |
| 592 | + |
590 | 593 | |
591 | 594 | |
592 | 595 | |
| ||
614 | 617 | |
615 | 618 | |
616 | 619 | |
617 | | - |
618 | 620 | |
619 | | - |
| 621 | + |
620 | 622 | |
621 | 623 | |
622 | 624 | |
|
Collapse file
+3Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
120 | 120 | |
121 | 121 | |
122 | 122 | |
| 123 | + |
123 | 124 | |
124 | 125 | |
125 | 126 | |
| ||
735 | 736 | |
736 | 737 | |
737 | 738 | |
| 739 | + |
738 | 740 | |
739 | 741 | |
740 | 742 | |
| ||
755 | 757 | |
756 | 758 | |
757 | 759 | |
| 760 | + |
758 | 761 | |
759 | 762 | |
760 | 763 | |
|
Collapse file
+6Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
59 | 59 | |
60 | 60 | |
61 | 61 | |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | + |
62 | 68 | |
63 | 69 | |
64 | 70 | |
|
0 commit comments