-
Notifications
You must be signed in to change notification settings - Fork 42
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
It takes too long to kill with version 2.0 #61
Comments
Yeah, I also noticed it is quite slow. This happened after adding a feature to throw if a process is not running on the provided port. Which prompted the major version bump. I think it would be best to revert to the previous v1 behavior and add the throw if the process is not running on the port as an additional configuration option. |
For now, i rollback to prev version: |
I can confirm that running |
I can also confirm the performance hit using a macos. Downgrading to |
The issue isn't specific to mac. Experience it on ubuntu 22.04. IIRC, the issue wasn't exist on my old laptop with ubuntu 20.04. |
Do you still have plans to do this @tiaanduplessis ? 🤝 |
Adding this entry to the scripts section of your package.json replaces this package, if you don't need to support windows (and only care about tcp though you could make a separate entry for udp ports):
Can then do |
The issue is related to reverse lookup of IP addresses to hostnames, which is done when calling |
- downgrade kill-port because of tiaanduplessis/kill-port#61
- downgrade kill-port because of tiaanduplessis/kill-port#61
- downgrade kill-port because of tiaanduplessis/kill-port#61
I rolled back to version 1 because it takes too much time to kill a process compared to version 1
It also throws an error if port is not found.
I think it's better to keep the existing logic to kill a port
lsof -i ${method === 'udp' ? 'udp' : 'tcp'}:${port}
instead of usinglsof -i -P
, which takes too much timeIMO
kill()
must resolve whenThe text was updated successfully, but these errors were encountered: