Introducing a new persistent connection caching system using "bundles".
authorLinus Nielsen Feltzing <linus@haxx.se>
Thu, 6 Dec 2012 11:12:04 +0000 (12:12 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 7 Dec 2012 09:08:33 +0000 (10:08 +0100)
commitd021f2e8a0067fc769652f27afec9024c0d02b3d
tree563742088b9866a1b8aa42ee7aab4501d72623dd
parentca5f4e21357a0b4a55e7a2a0f71e632442723989
Introducing a new persistent connection caching system using "bundles".

A bundle is a list of all persistent connections to the same host.
The connection cache consists of a hash of bundles, with the
hostname as the key.
The benefits may not be obvious, but they are two:

1) Faster search for connections to reuse, since the hash
   lookup only finds connections to the host in question.
2) It lays out the groundworks for an upcoming patch,
   which will introduce multiple HTTP pipelines.

This patch also removes the awkward list of "closure handles",
which were needed to send QUIT commands to the FTP server
when closing a connection.
Now we allocate a separate closure handle and use that
one to close all connections.

This has been tested in a live system for a few weeks, and of
course passes the test suite.
14 files changed:
lib/Makefile.inc
lib/bundles.c [new file with mode: 0644]
lib/bundles.h [new file with mode: 0644]
lib/conncache.c [new file with mode: 0644]
lib/conncache.h [new file with mode: 0644]
lib/connect.c
lib/easy.c
lib/hash.c
lib/hash.h
lib/http.c
lib/multi.c
lib/url.c
lib/url.h
lib/urldata.h