From 2337630746d6c7e43a22250042ee997016428720 Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 10 Sep 2009 12:34:29 +0200 Subject: [PATCH] Move arg parsing to beginning of main() For faster "./node -v" --- src/node.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/node.cc b/src/node.cc index f295cb6..5aa1dc1 100644 --- a/src/node.cc +++ b/src/node.cc @@ -472,6 +472,9 @@ ParseArgs (int *argc, char **argv) int main(int argc, char *argv[]) { + ParseArgs(&argc, argv); + V8::SetFlagsFromCommandLine(&argc, argv, true); + evcom_ignore_sigpipe(); ev_default_loop(EVFLAG_AUTO); // initialize the default ev loop. @@ -481,8 +484,6 @@ main(int argc, char *argv[]) ev_async_start(EV_DEFAULT_UC_ &eio_watcher); ev_unref(EV_DEFAULT_UC); - ParseArgs(&argc, argv); - V8::SetFlagsFromCommandLine(&argc, argv, true); V8::Initialize(); V8::SetFatalErrorHandler(OnFatalError); -- 2.7.4