src: only set v8 flags if argc > 1
authorEvan Lucas <evanlucas@me.com>
Wed, 2 Sep 2015 07:59:21 +0000 (02:59 -0500)
committerRod Vagg <rod@vagg.org>
Wed, 2 Sep 2015 11:32:17 +0000 (21:32 +1000)
commit2308a27c0aca3f0d1ea10780802642b4b4c9e8ac
tree5f1e6d4af8dae70b458ef3b79cb846b7b1ac82b6
parent205aab3bd437081d668bb4ae526c8303a514de86
src: only set v8 flags if argc > 1

ParseArgs sets the first element of v8_args to argv[0], so v8_argc will
always be at least 1. This change only calls
V8::SetFlagsFromCommandLine if v8_argc > 1, leading to an additional
startup improvement of ~5%.

PR-URL: https://github.com/nodejs/node/pull/2646
Reviewed-By: trevnorris - Trevor Norris <trev.norris@gmail.com>
src/node.cc