Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
startup: move EventEmitter closer to the lookup
Browse files Browse the repository at this point in the history
This makes startup faster by ~0.2 ms on my computer.
  • Loading branch information
mmalecki authored and bnoordhuis committed Feb 20, 2012
1 parent c3a9733 commit 1109c8f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/node.js
Expand Up @@ -27,10 +27,8 @@
(function(process) {
global = this;

var EventEmitter;

function startup() {
EventEmitter = NativeModule.require('events').EventEmitter;
var EventEmitter = NativeModule.require('events').EventEmitter;
process.__proto__ = EventEmitter.prototype;
process.EventEmitter = EventEmitter; // process.EventEmitter is deprecated

Expand Down

0 comments on commit 1109c8f

Please sign in to comment.