Skip to content
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

mdnsConn.readInto() high cpu usage #32

Open
amurchick opened this issue Mar 23, 2022 · 2 comments
Open

mdnsConn.readInto() high cpu usage #32

amurchick opened this issue Mar 23, 2022 · 2 comments

Comments

@amurchick
Copy link

I am see periodic high cpu usage of my HimeKit app and I am try to detect what wrong.

As show pprof/profile info - 36% cpu time spend on call net.InterfaceByIndex():
Screen Shot 2022-03-23 at 13 49 05

As I am see from sources https://github.com/brutella/dnssd/blob/master/mdns.go#L233 - net.InterfaceByIndex() called on each udp packet received.

May be cache interfaces info instead of get this info from system on every incoming udp packet?

@oliverpool
Copy link

Another possibility would be no to call net.InterfaceByIndex at all and only work with the iface.Index (the debug messages will be less clear)

@brutella
Copy link
Owner

Is this fixed now with #55 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants