[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] Speed up client by re-using RA session connections

From: Julian Foad <julian.foad_at_wandisco.com>
Date: Wed, 14 Sep 2011 16:07:19 +0100

A patch in progress, for demonstration and your feedback.

Since long ago we've thought about letting the client, through the
libsvn_client API, share a single RA connection across a series of
operations -- e.g.

  "svn update a b c" currently opens 3 RA sesssions.

Similarly, inside libsvn_client we often open up an extra RA session
when we could have re-used an old one -- e.g.

  Update with externals -- opens a new session per external [1]

  "svn mergeinfo" -- opens two or three sessions

The attached patch implements "caching" of connections that have been
used and may be used again. The cache is initialized (to empty) by the
caller (the client executable) and connections in it are established or
re-used by libsvn_client as required.

This patch demonstrates the usage inside "svn status" and "svn info"
subcommands, and also (partially) inside svn_client_mergeinfo_log()
which is the guts of the "svn mergeinfo" command.

In this patch, my idea is that the client passes the cache explicitly to
each API (or passes NULL to not use a cache), so that the client retains
control of the lifetime of these connections. The "svn" client, for
example, may not worry about ever clearing the cache whereas a
long-running GUI may clear it after a certain period of time, and/or
limit the number of entries in it.


In the email threads referenced below, we discussed some related issues
such as whether it would be better to use root-relative paths all the
time instead of "parenting" a session at a specific URL, and how this
ties in with authenticating for access to a specific path. But I don't
think those issues need to be addressed before adding the basic ability
to re-use a session at all.

Prior discussions:

[1] Email thread "Re-use connection for svn:externals", from Phillip
Hellewell on 2010-02-08,

[2] Email thread "[RFC] Concept of RA session relative paths", from Ivan
Zhakov on 2009-10-13,

- Julian

Received on 2011-09-14 17:08:02 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.