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

Socket polling method #619

Open
outrider-jkoch opened this issue Oct 18, 2024 · 2 comments
Open

Socket polling method #619

outrider-jkoch opened this issue Oct 18, 2024 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@outrider-jkoch
Copy link

Has it ever been considered to use a different polling method besides select() such as poll() or epoll()? I see the implementation changed slightly at version 0.11.0 to start abstracting some stuff out of poll_client() and moving it into some implementation methods. Perhaps there aren't any substantial performance gains to be had by changing but from my understanding the Linux community has been slowly moving away from using select() in favor of one of the others due to slightly better performance and the ability to handle potentially larger file descriptor values.

@outrider-jkoch outrider-jkoch added the question Further information is requested label Oct 18, 2024
@twslankard twslankard self-assigned this Oct 18, 2024
@matt-attack
Copy link

matt-attack commented Nov 9, 2024

Might be worth evaluation, though not sure there's much to gain compared to other optimizations.

Perhaps the main reason we haven't evaluated it so far is it is a platform specific API, but we support both Mac and Windows as well. Also, commonly most of the gains with E-Poll are in cases with large numbers of sockets but there's generally few here. This is especially true with our newer APIs which allow multiple sensors and data streams to share the same ports letting one go with as few as a single socket.

@outrider-jkoch
Copy link
Author

Thanks for the response. I understand the aspects of supporting multiple platforms and also not needed to handle a large numbers of sockets. I haven't studied the code enough to understand potential worst case scenarios and if the reconnection logic could eventually produce file descriptors with values that are out of the currently supported select() range.

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

No branches or pull requests

3 participants