After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 769417 - Download tiles in parallel and/or use HTTP pipelining or HTTP/2
Download tiles in parallel and/or use HTTP pipelining or HTTP/2
Status: RESOLVED NOTABUG
Product: libchamplain
Classification: Core
Component: view
unspecified
Other Linux
: Normal normal
: ---
Assigned To: libchamplain-maint
libchamplain-maint
Depends on:
Blocks:
 
 
Reported: 2016-08-02 11:02 UTC by Dominik Grafenhofer
Modified: 2016-08-02 20:39 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Dominik Grafenhofer 2016-08-02 11:02:29 UTC
Currently slow loading of tiles in gnome-maps due to proxying (https://bugzilla.gnome.org/show_bug.cgi?id=769352), revealed another performance issue:

Loading of tiles happens serially, i.e. one after the other. Given the overhead of http, performance would downloading tiles in parallel. Multiple solutions seem feasible: Starting download of multiple tiles in parallel, HTTP pipelining, or HTTP/2 may increase performance and reduce overhead.
Comment 1 Jiri Techet 2016-08-02 20:21:07 UTC
Tiles aren't loaded sequentially - libchamplain supports parallel loading of tiles. However, OSM usage policy here

http://wiki.openstreetmap.org/wiki/Tile_usage_policy

requires that we load at most two tiles in parallel so libchamplain restricts the number of libsoup threads to two here:

https://github.com/GNOME/libchamplain/blob/master/champlain/champlain-network-tile-source.c#L285

The last time I just experimentally played with the number and increased it to something bigger the parallel loading worked just fine (and was indeed faster) until the OSM server detected that after which it blocked all the traffic for me for several minutes.

The thing that could be improved though is we could have a configurable number of threads per tile source (different ones could allow more connections in parallel) - right now all tile sources are restricted to 2 threads (see https://bugzilla.gnome.org/show_bug.cgi?id=768890)
Comment 2 Jiri Techet 2016-08-02 20:39:06 UTC
Regarding HTTP/2 as far as I know OSM doesn't allow connections over SSL so it won't work.

I'm not sure if libsoup which we use for the HTTP requests supports pipelining - I haven't found anything when searching for it (let me know if you found something). Also, I'm not sure if OSM servers support HTTP pipelining.