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

Re[2]: two file time questions

From: chris lueders <svn-list_at_cxxl.de>
Date: 2005-05-27 10:03:55 CEST

hi,

Wednesday, May 25, 2005, 9:41:55 PM, "Ben Collins-Sussman" wrote:

>> i guess svn uses the file time to speed up it's diff process. fine.
>> but why doesn't it use the file size as well?

> It does use the filesize, but only later on.

> The algorithm is:

> if (timestamp hasn't changed)
> return NO_CHANGE;
> else if (filesize has changed)
> return CHANGED;
> else
> compare byte-by-byte.

why not use

   if (filesize has changed)
      return CHANGED;
   else if (timestamp hasn't changed)
      return NO_CHANGE;
   else
      compare byte-by-byte.

that will not change the runtime in any significant amount and be
safer, or am i missing a detail?
      

-- 
/chris/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri May 27 11:58:18 2005

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

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