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

Re: svn commit: rev 2216 - trunk/subversion/include trunk/subversion/libsvn_client trunk/subversion/clients/cmdline trunk/subversion/tests/clients/cmdline/getopt_tests_data

From: Greg Stein <gstein_at_lyra.org>
Date: 2002-06-14 22:42:04 CEST

On Fri, Jun 14, 2002 at 04:07:37PM -0400, Garrett Rooney wrote:
> On Fri, Jun 14, 2002 at 12:53:11PM -0700, Greg Stein wrote:
>...
> > This subpool covers the whole function. I think you may want to just use the
> > caller's pool for the initial entry and hash table, then use the subpool for
> > the iteration. A directory with 10k files in it will cause problems with the
> > "whole function" subpool.
>
> couldn't i also use the subpool for the svn_wc_entry, apr_stat, and
> apr_dir_make? i mean there's no reason to put the allocation in the
> parent's pool for those if we don't need them to stick around...

I had to look closer at the function... yes, they could also go into the
subpool. They'll get cleared after the first iteration, but no big deal. As
you point out, they are *very* transitory, so they just disappear.

Good point.

> the
> only things that need to persist through the loop are the dirents and
> the apr_hash_index_t, so couldn't i get away with using the parent
> pool for svn_io_get_dirents and apr_hash_first, and using the subpool
> for everything else, clearing it each time through the loop?

Yessir!

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jun 14 22:40:42 2002

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.