Re: [gtk-osx-users] Slow gdk_display_get_name() on macOS Sierra
- From: John Ralls <jralls ceridwen us>
- To: Jiří Techet <techet gmail com>
- Cc: gtk-osx-users-list gnome org
- Subject: Re: [gtk-osx-users] Slow gdk_display_get_name() on macOS Sierra
- Date: Wed, 15 Feb 2017 14:08:33 -0800
On Feb 15, 2017, at 1:33 PM, Jiří Techet <techet gmail com> wrote:
Hi,
after switching to macOS Sierra I (and another user) noticed that Geany whose OS X port I maintain starts
significantly slower:
https://github.com/geany/geany/issues/1277
After some debugging it turns out it's the gdk_display_get_name() call which takes several seconds to
complete. This function just returns [NSHost currentHost]; according to Apple documentation
https://developer.apple.com/reference/foundation/nshost/1408946-currenthost
the function can block for several seconds, depending on user's configuration. I found some more mentions
of this behaviour, e.g.
http://secure.macscripter.net/viewtopic.php?id=45309
Interestingly, simple unix gethostname() as used in Apple's implementation of the hostname command
https://opensource.apple.com/source/shell_cmds/shell_cmds-81.1/hostname/hostname.c
returns immediately (at least for me). Would it be OK to use gethostname() in gdk_display_get_name()? Is
there some specific reason why [NSHost currentHost] is used?
Not that I know about. I suggest you file a bug against gtk+/Backend:Quartz and see if any of the gtk devs
have any thoughts on the matter.
Regards,
John Ralls
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]