On 11 Mar 2010, Juliusz Chroboczek uttered the following:

> This is deliberately undocumented and somewhat difficult to enable,
> since I'm worried that a distributor will enable it by default in their
> binary package.  (You know, experience shows that not all distributors
> are intelligent.)
>
> You see, LOGGING_MAX is the mechanism that causes the logging instructions
> that are not enabled to be compiled out -- in that way, the values that
> are printed are not even evaluated.  Setting LOGGING_MAX to 0xFF causes
> all of this code to be included, and Polipo's performance to be reduced.

Not, I suspect, to any detectable degree, on modern hardware. And distributors
of non-embedded hardware are targetting CPUs so damn fast that a few thousand
or even million cycles blown here or there are utterly irrelevant. The logging
instructions mostly have good locality of reference, by their very nature either
logging things we've just done (that are certainly still in L2 cache) or things
we are about to do (that we're about to pull into L2 cache anyway).

So I suspect the logging level makes no practical difference to the
performance of Polipo on real-world hardware under normal load at all.
Anyone doing high levels of logging is going to be streaming their logs
via a syslogd anyway, which makes all the disk writing and buffer
flushing completely asynchronous too (though that will only incur a
cost for logging that isn't disabled at *runtime*).

> Oh, that's another issue -- I don't want to make it easy for stupid
> admins to spy on their users.

Now *that's* a good reason :)

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Polipo-users mailing list
Polipo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/polipo-users

Reply via email to