GNOME Bugzilla – Bug 751122
gsocket: avoid unnecessary g_socket_cond_wait() in _send_messages()
Last modified: 2015-06-21 09:33:38 UTC
For performance reasons we should always try to send our messages first and only wait for more space to become available if we get an EAGAIN (in blocking mode).
Created attachment 305495 [details] [review] gsocket: avoid unnecessary g_socket_cond_wait() in _send_messages() For performance reasons we should always try to send our messages first and only wait for more space to become available if we get an EAGAIN (in blocking mode).
Comment on attachment 305495 [details] [review] gsocket: avoid unnecessary g_socket_cond_wait() in _send_messages() should fix g_socket_receive_message() too while we're here. Also, I assume you tested that "make check" still passes?
Created attachment 305750 [details] [review] gsocket: avoid unnecessary select in _send_messages() and _receive_message() (v2) Thanks for the review! I did check the other functions, but clearly missed this one. I did run 'make check' and it still passes for me (on Linux). --- For performance reasons we should always try to send or receive our messages first and only wait for more space or data to become available if we get an EAGAIN (and are in blocking mode). v2: also do this in _receive_message()
Pushed, thanks: commit fd789f118741d89df348ba21ddc1d813da02fb76 Author: Tim-Philipp Müller <tim@centricular.com> Date: Wed Jun 3 13:06:24 2015 +0100 gsocket: avoid unnecessary select in _send_messages() and _receive_message() For performance reasons we should always try to send or receive our messages first and only wait for more space or data to become available if we get an EAGAIN (and are in blocking mode). https://bugzilla.gnome.org/show_bug.cgi?id=751122