From: Maciej MaƂecki Date: Sat, 18 Feb 2012 15:45:22 +0000 (+0100) Subject: startup: move `EventEmitter` closer to the lookup X-Git-Tag: v0.7.5~32 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1109c8fc4ec32d67a52334604473ceea2e0b00c9;p=platform%2Fupstream%2Fnodejs.git startup: move `EventEmitter` closer to the lookup This makes startup faster by ~0.2 ms on my computer. --- diff --git a/src/node.js b/src/node.js index 2cd797f..4a11b5c 100644 --- a/src/node.js +++ b/src/node.js @@ -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