Erik Scrafford <erik@scrafford.org>


Suggested
r858587

r858587 | rooneg | 2006-02-17 23:52:54 +0000 (Fri, 17 Feb 2006)

Fix for issue 2151 "'svn ls' is slow over ra_dav"

This patch implements a solution to issue 2151.  We now only request
the needed props in the PROPFIND for server listings. 'svn ls' is now
noticably faster.  In most cases 'ls' takes about half the time and half
the bandwidth - In some case even better results.

For backward compatibility, before doing the long PROPFIND we make
another simpler PROPFIND to see if the server supports the new type of
request (supports the deadprop-count prop). If it does we use the new
scheme and performance is improved - If not then we use the old scheme
and the slowness persists.

To summarise: only patched servers and patched clients have improved
speed. Mismatched configurations (old client or server) are not improved
but still work. Regular dav clients are still slow.

Patch by: Jean-Marc Godbout <jean-marc@computrad.com>
          Kazutoshi Satoda <k_satoda@f2.dion.ne.jp>

Suggested by: Erik Scrafford <erik@scrafford.org>
              Ben Collins-Sussman <sussman@collab.net>
(and everyone else who contributed to issue 2151)

* subversion/mod_dav_svn/liveprops.c
  (SVN_PROPID_deadprop_count): Added a PROPID to support the new prop
  (dav_svn_props[]): Added the deadprop-count prop to the list of
   supported props.
  (dav_svn_insert_prop): Returns the number of deadprops found in the
   fs for that file.

* subversion/libsvn_ra_dav/ra_dav.h
  (SVN_RA_DAV__PROP_DEADPROP_COUNT): Added the prop name for deadprop
  (ELEM_deadprop_count): Added the prop to the list of props

* subversion/libsvn_ra_dav/props.c
  (elem_definition, propfind_elements): Added ELEM_deadprop_count to
   the list of propfind props

* subversion/libsvn_ra_dav/fetch.c
  (deadprop_count_support_props[]): New array, list of props to get in
   a root PROPFIND
  (svn_ra_dav__get_dir): check if server supports 'deadprop-count', and
   if so, request fewer properties