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

Use the inotify API on linux to improve performance #5

Merged
merged 1 commit into from
Apr 11, 2021

Conversation

PythonJedi
Copy link

Now the gamepad extension only iterates over each input device when initialized or when there's an error while reading the inotify events. Any new input device is queried whether it's a gamepad and added if it is one every frame, so we still have plug-n-play equivalent to Windows and Emscripten.

On my system this takes the gamepad example from 20-30 FPS to 1000-1500 FPS without any optimization. With -O3, it goes from 40-50 FPS to 2000-3000 FPS.

Now the gamepad extension only iterates over each input device when initialized
or when there's an error while reading the inotify events. Any new input device
is queried whether it's a gamepad and added if it is one every frame, so we
still have plug-n-play equivalent to Windows and Emscripten.
@gorbit99 gorbit99 merged commit 92998af into gorbit99:master Apr 11, 2021
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

Successfully merging this pull request may close these issues.

2 participants