Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f666f5a

Browse filesBrowse files
wwwzbwcomBethGriggs
authored andcommitted
events: fix duplicate require which cause performance penalty
PR-URL: #39892 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Nitzan Uziely <linkgoron@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Zijian Liu <lxxyxzj@gmail.com> Reviewed-By: Qingyu Deng <i@ayase-lab.com>
1 parent 1eca9bc commit f666f5a
Copy full SHA for f666f5a

File tree

Expand file treeCollapse file tree

1 file changed

+1
-5
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-5
lines changed
Open diff view settings
Collapse file

‎lib/events.js‎

Copy file name to clipboardExpand all lines: lib/events.js
+1-5Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ const {
5050
SymbolAsyncIterator,
5151
} = primordials;
5252
const kRejection = SymbolFor('nodejs.rejection');
53+
const { inspect } = require('internal/util/inspect');
5354

5455
let spliceOne;
5556

@@ -63,10 +64,6 @@ const {
6364
},
6465
} = require('internal/errors');
6566

66-
const {
67-
inspect
68-
} = require('internal/util/inspect');
69-
7067
const {
7168
validateAbortSignal,
7269
validateBoolean,
@@ -372,7 +369,6 @@ EventEmitter.prototype.emit = function emit(type, ...args) {
372369
}
373370

374371
let stringifiedEr;
375-
const { inspect } = require('internal/util/inspect');
376372
try {
377373
stringifiedEr = inspect(er);
378374
} catch {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.