glfw/glfw — pull request #332 by zeux (2014-07-26 04:38:31+00:00)
Title: Optimize _glfwInitJoysticks on OSX

This function used to enumerate all devices and capture all properties
of every device into a dictionary. This takes 180 ms on a MacBook Pro
without external devices and 280 ms with an external keyboard/mouse
attached.

Since we're only interested in a few properties, we can just get them
one by one - this reduces the time to <1 ms.

Note that we still use the dictionary to get the joystick elements.
For unknown reason this is required to get all axes/buttons - without
doing this we don't get any joystick elements in addJoystickElement.