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

Re: cache crawler refactor thougths

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Sun, 20 Sep 2009 15:32:54 +0200

On 20.09.2009 13:19, Gunnar Dalsnes wrote:
> Hi,
>
> Saw some strange things in the crawler: -one queue for "paths" (that
> can be file or folder) and one queue for folders. This seems
> unnecessary. Any special reason for this? If not, I will re-factor to
> one queue.

While those look almost the same, they're not. I tried once to use just
one of those but failed - the cache didn't work anymore.
Can't remember exactly why but I remember that I thought it was too much
work to make it work with just one queue. I didn't even commit that change.

> -All paths inside admindirs are crawled except \tmp\ \tmp
> and \log. This seems weird since GetStatusForMember only care about
> changes to .svn\dir-prop-base and .svn\entries, so I don't see the
> point in crawling anything but changes to these two. I will change
> this if no objections.

GetStatusForMembers uses those two files to determine whether it has to
fetch the status again (i.e., whether an file/folder has changed).
Paths inside admindirs are never crawled, but they're added to the
queue. Because those are added to the queue by the directory watcher,
and we have to catch changes to more than just the two files to catch
all changes: don't forget about revert and commit. When reverting,
neither entries nor dir-prop-base will change. And with a commit, the
file itself won't change.

> One other thing: The cached flags in CTSVNPath are scary! Got several
> random assert\errors because of this. Caching of these flags, at
> least in TSVNCache, maybe should have been disabled? Any idea what
> positive impact this caching had on performance?

I doubt you got the assers because of the caching but due to race
conditions. You see, it's perfectly possible to get a 'true' returned
when checking whether a file exists, but then even one statement later
the file has been deleted by another process.
And caching is really necessary, otherwise the disk access would
increase a *lot* (try it and you'll see).

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=2397051
To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2009-09-20 15:33:00 CEST

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

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