Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8a997a5

Browse filesBrowse files
davisjamtargos
authored andcommitted
doc: note synchronous part of child_process.spawn
If an application has a large RSS (GB), jorangreef observed that child_process.spawn will block the event loop for ms-s. This is surprising behavior and merits documentation. Refs: #14917 PR-URL: #21234 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
1 parent e038b2f commit 8a997a5
Copy full SHA for 8a997a5

File tree

Expand file treeCollapse file tree

1 file changed

+6
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-0
lines changed
Open diff view settings
Collapse file

‎doc/api/child_process.md‎

Copy file name to clipboardExpand all lines: doc/api/child_process.md
+6Lines changed: 6 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,12 @@ child registers an event handler for the [`'disconnect'`][] event
652652
or the [`'message'`][] event. This allows the child to exit
653653
normally without the process being held open by the open IPC channel.*
654654

655+
On UNIX-like operating systems, the [`child_process.spawn()`][] method
656+
performs memory operations synchronously before decoupling the event loop
657+
from the child. Applications with a large memory footprint may find frequent
658+
[`child_process.spawn()`][] calls to be a bottleneck. For more information,
659+
see [V8 issue 7381](https://bugs.chromium.org/p/v8/issues/detail?id=7381).
660+
655661
See also: [`child_process.exec()`][] and [`child_process.fork()`][].
656662

657663
## Synchronous Process Creation

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.