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

Re: libsvn_repos logging -- design problems

From: Branko ─îibej <brane_at_xbc.nu>
Date: 2005-07-16 01:34:52 CEST

Greg Hudson wrote:

>Perhaps this argument can't be settled until we get down to the detail
>level. Your initial conception of this small, low-risk investment was a
>macro which used a global variable, which would have tossed out the
>window different logging levels for different repositories. I'm still
>not sure what this hypothetical macro would look like.
>
>
Eh? Here's that macro again:

 #define SVN_REPOS_WRITE_ERRORLOG(repo, level, process, message, pool) \
   while { \
     svn_repos_loglevel_t loglevel; \
     SVN_ERR (svn_repos_get_loglevel (&loglevel, (repo), (pool))); \
     if ((level) <= loglevel) \
       SVN_ERR (svn_repos_write_errorlog ((repo), (level), (process), \
                                          (message), (pool))); \
   } while (0)

Nothing global anywhere in there. This is exactly what you mean by (1) here:

On Jul 15, 2005, at 11:02 AM, Greg Hudson wrote:

>My advice is to ignore Branko's concern until it becomes an issue; when
>it does, we can optimize performance in successive steps by (1) querying
>the log level to avoid creating arguments, and (2) caching the log level
>to avoid making any function calls.
>

(Of course, that macro is based on the API patch as it stood then, with
the error return from accessors, etc. Without that, it could be made a
bit simpler.)

-- Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Jul 16 01:36:20 2005

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