As of 30 March 2018, downloading Qt metadata involves 2391 HTTP GET requests on Windows and 1205 GETs on Linux.
Each GET uses a separate TCP connection. This results in a lot of unnecessary SYN and FIN handshakes.
I asked Wireshark to capture traffic to/from 220.127.116.11 (download.qt.io). The full capture is attached; here's a summary of the opening sequence:
- When I start downloading metadata, 6 SYN packets are sent consecutively (all within a ~1.5 ms interval). The ports are 60625 - 60630.
- 400 ms later, the SYN-ACK packets start arriving. Each port responds with an ACK then a HTTP GET.
- 400 ms later, the first response is received. A flurry of *ACK*s occur between port 60626 and the server.
- (Port 60625 starts receiving its response here, but let's ignore that for now)
- 20 ms later, the the first GET finishes and a FIN-ACK packet is sent from port 60626.
- 5 ms later, a SYN packet is sent from port 60631.
- 400 ms later, a SYN-ACK packet is received at port 60631.
- (Keep repeating...)
For me in Australia, the metadata download took 341 s = 5.7 min. Of this, roughly (2391 / 6) * 400 ms = 2.7 min is spent waiting on SYN handshaking. Reusing TCP connections could halve the download time!