PR27701: debuginfod client: encourage reused debuginfod_client objects
authorFrank Ch. Eigler <fche@redhat.com>
Fri, 23 Apr 2021 17:04:26 +0000 (13:04 -0400)
committerFrank Ch. Eigler <fche@redhat.com>
Sat, 1 May 2021 01:26:27 +0000 (21:26 -0400)
commit6c8b68b0245c8754997b4c4b0ff4ba24974e3fdd
tree9e10760105fe5883e5c8008a7866ff3131b9b842
parent883f3d0151f61f6eb93c397501570527cd19044a
PR27701: debuginfod client: encourage reused debuginfod_client objects

Client objects now carry long-lived curl handles for outgoing
connections.  This makes it more efficient for multiple sequential
queries, because the TCP connections and/or TLS state info are kept
around awhile, avoiding O(100ms) setup latencies.  debuginfod is
adjusted to take advantage of this for federation.  Other clients
should gradually do this too, perhaps including elfutils itself (in
the libdwfl->debuginfod_client hooks).

A large gdb session with 117 debuginfo downloads was observed to run
twice as fast (45s vs. 1m30s wall-clock time), just in nuking this
extra setup latency.  This was tested via a debuginfod intermediary:
it should be even faster once gdb reuses its own debuginfod_client.

Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
debuginfod/ChangeLog
debuginfod/debuginfod-client.c
debuginfod/debuginfod.cxx
doc/ChangeLog
doc/debuginfod_find_debuginfo.3
tests/ChangeLog
tests/run-debuginfod-find.sh