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

A possible svn_wc_text_modified_p optimisation

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2002-01-14 23:10:47 CET

Hello

Propmted by some recent mail about timestamps...

In svn_wc_text_modified_p() the timestamps of the wc and text-base are
checked to determine if the file is unchanged. Only if this fails is
the potentially expensive svn_wc__versioned_file_modcheck()
called. Thus my idea for an optimisation: if after calling
svn_wc__versioned_file_modcheck() we see that the file is in fact
unchanged we adjust the timestamp on the text-base so that on
subsequent calls the timestamp check will be sufficient.

We would need an (apr?) function to set timestamps, of course. It's a
simple utime call on Unix, don't know about other plaforms.

'svn revert' could also update the text-base timestamp, making the wc
and text-base identical, although this is not such a big optimisation
if svn_wc_text_modified_p() also does it.

-- 
Philip
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:56 2006

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.