New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there any change to optimize the processing time? #25
Comments
That is very slow indeed. What operating system and Node.js version are you on? |
@sindresorhus win10 + nodejs 8.0.0 |
Then probably not. |
ok, thanks anyway |
@debuggy Are those processes doing some kind of I/O by any chance? EDIT: Process Explorer or Process Monitor might help you debug this issue. |
@MarkTiedemann Thanks for your kind reply, actually I have tackled this issue by using tree-kill ... It also executes |
@debuggy Since both Can you perhaps share a minimal reproduction for this case? I'd be happy to help figure out why this discrepancy occurs. |
In my case fkill was running painfully slow (+40s), and I figured out its because it uses |
@mugiseyebrows The speedup you got from reinstalling was probably related to a recent performance issue in If you want to write a PR that properly handles |
@mugiseyebrows Since you only want to kill a single process, there's a huge overhead in To mitigate this overhead, we could write a Node native addon (hard to maintain) or build a simple binary which could be executed from Node which only checks whether a single process is running. For example, from the binary, we could call the PS: If I have time in the upcoming days, I might work on this. :) |
@mugiseyebrows I checked the exit codes for
Also, there might be other exit codes in edge cases (see: Windows system errors codes). Also, when killing multiple processes with
Also, when multiple failures occur, the exit code
Also, you cannot reliably parse the error message strings (e.g. So yeah, this is a huge mess. :) In conclusion, I think |
@0maxxam0 has funded $8.00 to this issue.
|
I need to kill the process tree in 5 seconds. However, I found that the code will run almost 10+ seconds before returned. Any suggestions? Thanks.
The text was updated successfully, but these errors were encountered: