Skip to content

Commit

Permalink
events: fix duplicate require which cause performance penalty
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
wwwzbwcom authored and BethGriggs committed Sep 21, 2021
1 parent f184c18 commit a09e187
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const {
SymbolAsyncIterator,
} = primordials;
const kRejection = SymbolFor('nodejs.rejection');
const { inspect } = require('internal/util/inspect');

let spliceOne;

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

const {
inspect
} = require('internal/util/inspect');

const {
validateAbortSignal,
validateBoolean,
Expand Down Expand Up @@ -372,7 +369,6 @@ EventEmitter.prototype.emit = function emit(type, ...args) {
}

let stringifiedEr;
const { inspect } = require('internal/util/inspect');
try {
stringifiedEr = inspect(er);
} catch {
Expand Down

0 comments on commit a09e187

Please sign in to comment.