Lags on Sierra

47 views
Skip to first unread message

Alexey Kuznetsov

unread,
Sep 26, 2016, 5:19:35 AM9/26/16
to Telephone Discussions
Hi,

If you’re experiencing lags on Sierra when Telephone connects first time after launch, you can enable file sharing in the OS to overcome this:

System Preferences > Sharing > [x] File Sharing

You don’t have to have any shared folders, but enabling the service itself helps against lags. The lag can’t be eliminated without changing the OS (and I’ll file a bug report for that), but at least I’ll address the beachball problem in Telephone update. So although the total time to connect will not be improved by Telephone update, at least it’ll make the UI responsive.

Telephone, of course, doesn’t use any file sharing. The problem is in the name resolving mechanism (getting IP address for a hostname). At different points in time PJSIP—the SIP library used in Telephone—calls the system function getaddrinfo(), which in turn calls the internal mdns_addrinfo() function, which looks very much like Bonjour-related (mdns stands for Multicast DNS, a part of the Bonjour technology).

The problem is that on earlier macOS versions the getaddrinfo() function was returning fast, regardless of the file sharing service state. On Sierra it has this lag, probably while waiting for some response and later failing on timeout. macOS file sharing services are related (or depend upon) Bonjour, that’s why this lag is related to the file sharing service state.

Alexey
Reply all
Reply to author
Forward
0 new messages