[ostree] pull: override max-conns-per-host to 8, for faster downloads
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] pull: override max-conns-per-host to 8, for faster downloads
- Date: Fri, 25 Jul 2014 14:23:13 +0000 (UTC)
commit 249da7aef20d9a4ec0b2cb04ad2a9184974f7e4d
Author: James Antill <james and org>
Date: Fri Jul 25 10:08:02 2014 -0400
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.
src/libostree/ostree-fetcher.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/libostree/ostree-fetcher.c b/src/libostree/ostree-fetcher.c
index b6dc761..a049e0f 100644
--- a/src/libostree/ostree-fetcher.c
+++ b/src/libostree/ostree-fetcher.c
@@ -188,6 +188,14 @@ _ostree_fetcher_init (OstreeFetcher *self)
self->requester = (SoupRequester *)soup_session_get_feature (self->session, SOUP_TYPE_REQUESTER);
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;
g_signal_connect (self->session, "request-started",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]