Stefan KÃ¼ng <tortoisesvn_at_gmail.com> writes:
> On 02.08.2010 12:32, Bert Huijben wrote:
>>> So is there an (almost as) fast way to check whether a folder is
>>> versioned or not?
>> I think the fastest way in the current code would be to call
>> svn_wc_read_kind() on the directory, maybe after first checking that there
>> is some .svn in at least one of the parent directories.
> I thought about implementing a small cache for that, so that I don't
> have to walk up the tree every time to find an .svn dir.
> But I thought I read something about such a small cache getting
> implemented in the svn library itself so I wanted to ask first - maybe
> there's already an API to use that cache. Or maybe I just remember it
Does TSVN cache/reuse svn_client_ctx_t handles? In 1.7 the client
context contains an opaque wc context which in turn includes a
database context, svn_wc__db_t. The database context caches sqlite
connections and has a cache mapping directory->database.
Quite when TSVN should create/destroy svn_client_ctx_t is an
interesting question. Reusing a long-lived context (or perhaps a
small number, one per-thread say) is likely to make individual svn
calls faster. However the open database handles means that Windows
won't be able to delete root directories. It's not clear to me how
or when TSVN would close those handles.
Received on 2010-08-03 12:43:40 CEST