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

Re: Svnserve still exiting randomly in threaded mode

From: John Peacock <jpeacock_at_rowman.com>
Date: 2004-05-18 20:12:53 CEST

Greg Hudson wrote:

> I think he meant that debug-level logs should use a macro which
> evaluates to nothing if a compile-time flag isn't turned on.

OK, that I'll buy as a reasonable argument.

>
> I don't believe that it matters, unless you've put a debug log inside a
> tight loop (like the core of the vdelta loop). And I continue to
> believe that debug-level logs are a bad idea, because (a) they clutter
> the code, and (b) we can't easily put them in the libraries, and without
> that they don't do any good.

I think you are imaging a much deeper level of debug than I am certainly
thinking about. I have to look at how the Apache ra_dav logs are structured,
but I wouldn't think we should go any deeper than "so and so asked for this
file" not all of the internal code on actually processing the file from the
database (for example).

Ideally, whatever gets currently gets logged with ra_dav should be similarly
logging using ra_svn.

>
> -1 on using global variables.

That was pseudo-code; there is going to be some way of evaluating whether
logging has been requested at all. It doesn't have to be a "global variable"
but it does have to be accessible globally.

>
> And, once again, stop with the damn cycle micromanagement. Unless you
> have a benchmark showing measurably worse performance from evaluating
> the log level inside the logging function, don't clutter up the caller,
> macros or no.
>

It's not the evaluation that is the issue; it is the dispatch expense of calling
a log function only to ignore the output. Perhaps my example left the wrong
impression; I'm suggesting only that the log routines should not be called if
logging isn't even turned on.

I'm not micromanaging cycles by refusing to make an expensive call (especially
constructing strings) if I can short circuit via a test; that's just good
programming.

John

-- 
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Boulevard
Suite H
Lanham, MD  20706
301-459-3366 x.5010
fax 301-429-5748
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue May 18 20:12:54 2004

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.