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

[RFC] A libsvn_wc properties optimisation

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2004-11-06 10:44:02 CET

At present each versioned file has two properties files in the admin
area, the base properties and the working properties. Files that
don't have properties use empty properties files, ones that just
contain END.

I propose to remove both properties files for items that don't have
properties. Further, for items that do have properties but don't have
property modifications I propose to remove the working properties
file. When there is no working properties file it should be possible
to remove prop-time from the entries file, making it slightly smaller
and faster to parse.

This will the following effects, it will reduce the disk space used by
lots of working copies (possibly 2500 files for a Subversion trunk,
which is 10MB if each file uses a 4KB block or 15% of the total), it
will reduce disk IO when checking out a working copy, and it will make
detection of property changes more efficient.

The last point is related to svn_wc_props_modified_p. At present that
function uses 6 stat() calls to determine when a file with properties
has no modifications. Under the new scheme a single stat() on the
working props file will determine if there is a file, and if not then
there are no property modifications.

The empty properties file, one that just contains END, will still be
used as a working properties file--it will indicate a file which has
property modifications that delete all properties.

While it may be possible to use the presence of a working properties
file to infer that there are properties modifications, initially at
least I propose to leave the full comparison code. I think this will
make old working copies compatible with the new code. Increasing the
working copy version and then using the presence of the working
properties file as an positive indication that there are properties
modifications may be a later optimisation. It may even be possible to
replace prop-time in the entries file with a props-modified flag and
avoid using stat() altogether.

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Nov 6 10:44:40 2004

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.