Skip to content

Commit f666f5a

Browse files
wwwzbwcomBethGriggs
authored andcommitted
events: fix duplicate require which cause performance penalty
PR-URL: #39892 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Nitzan Uziely <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Minwoo Jung <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Zijian Liu <[email protected]> Reviewed-By: Qingyu Deng <[email protected]>
1 parent 1eca9bc commit f666f5a

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lib/events.js

+1-5
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)