pull: override max-conns-per-host to 8, for faster downloads

Modern web browsers are all converging on 6 or 8.  Let's match that.
This commit is contained in:
James Antill 2014-07-25 10:08:02 -04:00 committed by Colin Walters
parent d5e813c52c
commit 249da7aef2
1 changed files with 8 additions and 0 deletions

View File

@ -188,6 +188,14 @@ _ostree_fetcher_init (OstreeFetcher *self)
self->requester = (SoupRequester *)soup_session_get_feature (self->session, SOUP_TYPE_REQUESTER); self->requester = (SoupRequester *)soup_session_get_feature (self->session, SOUP_TYPE_REQUESTER);
g_object_get (self->session, "max-conns-per-host", &max_conns, NULL); g_object_get (self->session, "max-conns-per-host", &max_conns, NULL);
if (max_conns <= 8)
{
// We download a lot of small objects in ostree, so this helps a
// lot. Also matches what most modern browsers do.
max_conns = 8;
g_object_set (self->session, "max-conns-per-host", max_conns, NULL);
}
self->max_outstanding = 3 * max_conns; self->max_outstanding = 3 * max_conns;
g_signal_connect (self->session, "request-started", g_signal_connect (self->session, "request-started",