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

Re: [PATCH] libsvn_client: Avoid direct call tosvn_pool_create()function

From: Daniel Rall <dlr_at_collab.net>
Date: 2007-01-15 19:25:03 CET

On Wed, 10 Jan 2007, Peter Lundblad wrote:

> Bhuvaneswaran Arumugam writes:
> > On Tue, 2007-01-09 at 11:12 -0800, Daniel Rall wrote:
> > Thanks for your comment Dan. Here, since I explain the description of
> > this patch as part of the commit message, i avoided mentioning the same
> > here.
> >
> > > > [[[
> > > > Avoid calling svn_pool_create() function directly for passing the return
> > > > value as an argument.
> > > >
> ...
> > > > ]]]
> > >
>
> The real purpose of this change is still unclear to me. It seems to
> be to destroy the scratchpool, but can't we just avoid this confusing pool
> usage by getting rid of this extra pool here?

The scratch pool isn't useful in the svn_client_proplist2() function
(shown in Bhuvan's change). However, the parameter is a memory usage
optimization when the remote_proplist() function calls itself
recursively.

Another option would be to allocate and destroy the scratch pool
inside of remote_proplist() when one is not provided by the caller.
However, this requires that we track whether a pool was provided,
which has a slightly higher complexity cost than Bhuvan's approach,
since it complicates the implementation without simplifying the
interface.

I've committed a tweaked version of Bhuvan's patch in r23017.

  • application/pgp-signature attachment: stored
Received on Mon Jan 15 19:41:03 2007

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