Commit a309ee1
util: improve performance inspecting proxies
This makes sure we do not retrieve the handler in case it's not
required. This improves the performance a tiny bit for these cases.
Backport-PR-URL: #31431
PR-URL: #30767
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>1 parent a1555cb commit a309ee1Copy full SHA for a309ee1
File tree
Expand file treeCollapse file tree
4 files changed
+22
-11
lines changedOpen diff view settings
Filter options
- benchmark/util
- lib/internal/util
- src
- test/parallel
Expand file treeCollapse file tree
4 files changed
+22
-11
lines changedOpen diff view settings
Collapse file
benchmark/util/inspect-proxy.js
Copy file name to clipboardExpand all lines: benchmark/util/inspect-proxy.js+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
4 | 4 | |
5 | 5 | |
6 | 6 | |
7 | | - |
| 7 | + |
8 | 8 | |
9 | 9 | |
10 | 10 | |
|
Collapse file
lib/internal/util/inspect.js
Copy file name to clipboardExpand all lines: lib/internal/util/inspect.js+2-2Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
640 | 640 | |
641 | 641 | |
642 | 642 | |
643 | | - |
| 643 | + |
644 | 644 | |
645 | 645 | |
646 | 646 | |
647 | 647 | |
648 | | - |
| 648 | + |
649 | 649 | |
650 | 650 | |
651 | 651 | |
|
Collapse file
+14-6Lines changed: 14 additions & 6 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
91 | 91 | |
92 | 92 | |
93 | 93 | |
| 94 | + |
| 95 | + |
94 | 96 | |
95 | 97 | |
96 | | - |
97 | | - |
98 | | - |
99 | | - |
| 98 | + |
| 99 | + |
| 100 | + |
| 101 | + |
| 102 | + |
100 | 103 | |
101 | | - |
102 | | - |
| 104 | + |
| 105 | + |
| 106 | + |
| 107 | + |
| 108 | + |
| 109 | + |
| 110 | + |
103 | 111 | |
104 | 112 | |
105 | 113 | |
|
Collapse file
test/parallel/test-util-inspect-proxy.js
Copy file name to clipboardExpand all lines: test/parallel/test-util-inspect-proxy.js+5-2Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
43 | 43 | |
44 | 44 | |
45 | 45 | |
46 | | - |
| 46 | + |
47 | 47 | |
48 | 48 | |
49 | 49 | |
| 50 | + |
| 51 | + |
| 52 | + |
50 | 53 | |
51 | 54 | |
52 | 55 | |
| ||
105 | 108 | |
106 | 109 | |
107 | 110 | |
108 | | - |
| 111 | + |
109 | 112 | |
110 | 113 | |
111 | 114 | |
|
0 commit comments