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

Using socket.recv() with small values is expensive #397

Closed
alippai opened this issue Sep 9, 2020 · 2 comments
Closed

Using socket.recv() with small values is expensive #397

alippai opened this issue Sep 9, 2020 · 2 comments

Comments

@alippai
Copy link
Contributor

alippai commented Sep 9, 2020

Using the file-like object with read(1) is better if you set up buffering eg. using socket.makefile(mode='rb', buffering=1024*1024). Avoiding frequent system calls caused by recv() the data row fetching can double the throughput (on large datasets).

@alippai alippai changed the title Don't use recv() directly with small values Using socket.recv() with small values is expensive Sep 9, 2020
@sitingren
Copy link
Member

@alippai Thanks for your suggestions! Please feel free to make a pull request for this improvement.

@alonme
Copy link
Contributor

alonme commented Apr 10, 2022

closed by #441.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants