On Wed, Jun 4, 2014 at 8:30 PM, Vinay Ram <[email protected]> wrote:
> I have a scenario where multiple node apps must be executed in embedded > environment. Loading time is one of the crucial factor and I am wondering > if running the apps in separate child processes (using child_process.fork) > is faster than running them in independent node processes. Any ideas? > If you use `child_process`, you'll have an IPC channel between the controlling and child processes that may save you a little bit of marshaling overhead, but either way you're going to end up with multiple processes. You're likely to get more time savings by starting all of your processes ahead of time, if you know how many you're going to need and you have enough RAM to keep them all in memory. > A related question. Does child_process.fork() use copy-on-write? > > No. CoW wouldn't get you that much, either, due to V8 being a JITted dynamic runtime; you might be able to share the core V8 code, but none of the JS pages. CoW and dynamic languages don't really get along. -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/CAHG3qKq5x9PvwVnADix4eV0_bJmEMvWFpZA3Y%2B9OOyrpxvcRLQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
