-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
InterfaceListenAddresses called way too often #112
Comments
Doing this properly is pretty difficult unless we're willing to ignore interface changes (until our cache expires). On Linux, at least, we'd need to subscribe to udev events 😨. We should do this eventually but this will be a real PITA. |
I would say, it would be better to discover why it is called so frequently and how frequently really. If we use it to tell other nodes our addresses, I would say there would be no hard in having some short (few second) cache. |
I believe that is the use-case, so yes, a few second cache should be fine. However, we really should subscribe to interface changes so we can change our announced addresses (but we can do that later). |
IMO then 1. it should be separate package 2. should handle BSDs, Windows and hopefully Mobile with sane fallback. |
InterfaceListenAddresses gets called quite a lot, and its a method that makes syscalls to resolve 0.0.0.0 addresses into real IP addresses. These should probably be cached in some way to aleviate the stress on the kernel we cause with so many syscalls here
The text was updated successfully, but these errors were encountered: