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

Re: [PATCH] Re: "svn revert" performance

From: Brian Denny <brian_at_briandenny.net>
Date: 2003-11-01 05:18:46 CET

On Sat, Nov 01, 2003 at 03:47:28AM +0000, Gareth McCaughan wrote:
> I was just following what revert-cmd.c does. What's the benefit
> of clearing at the start of the loop? It replaces a pointless "clear,
> then destroy" at the end with an equally pointless "create, then
> clear" at the start. I don't see any way in which it's more robust.
> Is it just a matter of idiomatic consistency, or is there an advantage
> I'm missing? -- Anyway, even if it's only for the sake of consistency
> I might as well go along :-).

Certain control-flow constructs (e.g. "continue") can result in the
pool not getting cleared, if it's cleared at the end of the loop.
Putting the clear at the beginning avoids that problem.

The specific code you're looking at may not have a "continue" statement,
but that's where the idiomatic consistency comes in. :)


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Nov 1 05:08:38 2003

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.