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

Re: Reading old "entries" files: "Too many open files"

From: Greg Stein <gstein_at_gmail.com>
Date: Tue, 25 Aug 2009 13:43:03 -0400

On Tue, Aug 25, 2009 at 13:32, Julian Foad<julianfoad_at_btopenworld.com> wrote:
> Greg Stein wrote:
>> And the open-database count will drop from some multiple of 300 to
>> just a couple when we shift to a single .svn subdir.
> That will be OK for the command-line client, but if I were writing a
> long-lived client, how would I go about closing those db files after
> doing all I needed to do for the time being in a particular WC?
> Specifically, I'm thinking, could I try putting such a "close" into the
> loop over all targets in svn_client_update3() and see if it works?

We're only going to open *one* wc.db per working copy, when we're
done. You can either leave it open in your client, or clear the pool
that you allocated your svn_client_ctx_t within. (that ctx has the
wc_ctx which has the db, which has the sqlite handle)

If you use the same client_ctx (and wc_ctx) to those update calls,
then the open handles will be reused. Forcing them closed might
actually slow ya down as it reopens them.

Oh, and to clarify: the wc_ctx can work on *all* working copies
simultaneously. It doesn't have the concept of "a particular WC", as
you put it.


Received on 2009-08-27 00:05:48 CEST

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.