Bug 594768 - allow multiple concurrent connection attempts
allow multiple concurrent connection attempts
Status: RESOLVED FIXED
Product: libsoup
Classification: Core
Component: HTTP Transport
2.27.x
Other Linux
: Normal normal
: ---
Assigned To: libsoup-maint@gnome.bugs
libsoup-maint@gnome.bugs
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2009-09-10 18:05 UTC by Dan Winship
Modified: 2009-10-12 15:08 UTC (History)
1 user (show)

See Also:
GNOME target: ---
GNOME version: ---


Attachments
Allow multiple pending connections to a server at once (3.07 KB, patch)
2009-10-11 20:47 UTC, Dan Winship
none Details | Diff | Review

Description Dan Winship 2009-09-10 18:05:11 UTC
right now, for ease-of-bookkeeping reasons, libsoup never has more than one pending connection to any given host. (that is, after it starts a connect(), it has to wait until that completes before it will start another connect() to the same host.)

This causes poor network utilization in some cases, like loading the flags in http://en.wikipedia.org/wiki/Use_of_capital_punishment_by_nation

<danw> hm... oh, yeah. so basically the problem is that libsoup doesn't want to have multiple connection attempts pending at the same time. so if you start with no connections, then it has to make the first attempt, and then when that succeeds, it will make the second attempt, etc.
<danw> but in this case, the server is slow to accept the connections, and then the resources are tiny, and it closes the connection after sending
<danw> so we end up spending most of the time with at most 2 connections working
<danw> because by the time the second one finishes connecting so the third can start, the first has already finished and closed
Comment 1 Dan Winship 2009-10-11 20:47:50 UTC
Created attachment 145256 [details] [review]
Allow multiple pending connections to a server at once

STill testing this...
Comment 2 Dan Winship 2009-10-12 15:08:37 UTC
seems to work, pushed!

Note You need to log in before you can comment on or make changes to this bug.