Commit 527407c
src: cache the result of GetOptions() in JS land
Instead of calling into C++ each time we need to check the value
of a command line option, cache the option map in a new
`internal/options` module for faster access to the values in JS land.
PR-URL: #24091
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Refael Ackermann <refack@gmail.com>1 parent 3e14212 commit 527407cCopy full SHA for 527407c
File tree
Expand file treeCollapse file tree
14 files changed
+47
-42
lines changedOpen diff view settings
Filter options
- lib
- internal
- bootstrap
- modules
- cjs
- esm
- process
- src
Expand file treeCollapse file tree
14 files changed
+47
-42
lines changedOpen diff view settings
Collapse file
+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
34 | 34 | |
35 | 35 | |
36 | 36 | |
37 | | - |
| 37 | + |
38 | 38 | |
39 | 39 | |
40 | 40 | |
|
Collapse file
lib/internal/bash_completion.js
Copy file name to clipboardExpand all lines: lib/internal/bash_completion.js+1-2Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | | - |
| 2 | + |
3 | 3 | |
4 | 4 | |
5 | | - |
6 | 5 | |
7 | 6 | |
8 | 7 | |
|
Collapse file
lib/internal/bootstrap/loaders.js
Copy file name to clipboardExpand all lines: lib/internal/bootstrap/loaders.js+1-2Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
217 | 217 | |
218 | 218 | |
219 | 219 | |
220 | | - |
221 | | - |
| 220 | + |
222 | 221 | |
223 | 222 | |
224 | 223 | |
|
Collapse file
lib/internal/bootstrap/node.js
Copy file name to clipboardExpand all lines: lib/internal/bootstrap/node.js+8-8Lines changed: 8 additions & 8 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
113 | 113 | |
114 | 114 | |
115 | 115 | |
116 | | - |
117 | | - |
118 | | - |
119 | | - |
120 | | - |
121 | | - |
| 116 | + |
| 117 | + |
| 118 | + |
| 119 | + |
| 120 | + |
| 121 | + |
| 122 | + |
122 | 123 | |
123 | 124 | |
124 | 125 | |
| ||
631 | 632 | |
632 | 633 | |
633 | 634 | |
634 | | - |
635 | 635 | |
636 | 636 | |
637 | | - |
| 637 | + |
638 | 638 | |
639 | 639 | |
640 | 640 | |
|
Collapse file
lib/internal/modules/cjs/helpers.js
Copy file name to clipboardExpand all lines: lib/internal/modules/cjs/helpers.js+2-2Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
9 | 9 | |
10 | 10 | |
11 | 11 | |
12 | | - |
| 12 | + |
13 | 13 | |
14 | 14 | |
15 | 15 | |
| ||
107 | 107 | |
108 | 108 | |
109 | 109 | |
110 | | - |
| 110 | + |
111 | 111 | |
112 | 112 | |
113 | 113 | |
|
Collapse file
lib/internal/modules/cjs/loader.js
Copy file name to clipboardExpand all lines: lib/internal/modules/cjs/loader.js+4-4Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
40 | 40 | |
41 | 41 | |
42 | 42 | |
43 | | - |
44 | | - |
45 | | - |
46 | | - |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
47 | 47 | |
48 | 48 | |
49 | 49 | |
|
Collapse file
lib/internal/modules/esm/default_resolve.js
Copy file name to clipboardExpand all lines: lib/internal/modules/esm/default_resolve.js+3-3Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
6 | 6 | |
7 | 7 | |
8 | 8 | |
9 | | - |
10 | | - |
11 | | - |
| 9 | + |
| 10 | + |
| 11 | + |
12 | 12 | |
13 | 13 | |
14 | 14 | |
|
Collapse file
lib/internal/options.js
Copy file name to clipboard+18Lines changed: 18 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 | + |
Collapse file
+3-2Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | | - |
| 2 | + |
| 3 | + |
3 | 4 | |
4 | 5 | |
5 | 6 | |
| ||
132 | 133 | |
133 | 134 | |
134 | 135 | |
135 | | - |
| 136 | + |
136 | 137 | |
137 | 138 | |
138 | 139 | |
|
Collapse file
lib/internal/process/esm_loader.js
Copy file name to clipboardExpand all lines: lib/internal/process/esm_loader.js+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
48 | 48 | |
49 | 49 | |
50 | 50 | |
51 | | - |
| 51 | + |
52 | 52 | |
53 | 53 | |
54 | 54 | |
|
0 commit comments