Child process maximum limit

无人久伴 提交于 2019-12-25 01:10:02

问题


I want to compute the size of folder (i used readdirp module). For large folder the operation blocks my main thread so my electron application hangs.

So i moved size computation process to forked child.

since i have array of folders, i looping and forking new child process, on every iteration.

These child Nodes are still whole new instances of V8. Assume at least 30ms startup and 10mb memory for each new Node. That is, you cannot create many thousands of them. I have studied somewhere.

  1. so how to manage this forking process ?

NOTE : After completion of computation in child, i sended the result details to parent using IPC (process.send)

Can i able to make use of cluster module for this operation, if that how ?.

来源:https://stackoverflow.com/questions/56946574/child-process-maximum-limit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!