From: JINMEI Tatuya Date: Wed, 23 May 2012 16:35:28 +0000 (-0700) Subject: [1512] added note about overhead tradeoff for the formatter classes. X-Git-Tag: trac2351_base~226^2~82^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=be4044ab9ca0163c7a736a1baa045f3b9192f11a;p=thirdparty%2Fkea.git [1512] added note about overhead tradeoff for the formatter classes. --- diff --git a/src/lib/python/isc/ddns/logger.py b/src/lib/python/isc/ddns/logger.py index e4f5ed8ba9..9e92a9fdcb 100644 --- a/src/lib/python/isc/ddns/logger.py +++ b/src/lib/python/isc/ddns/logger.py @@ -37,6 +37,13 @@ class ClientFormatter: message is suppressed because of its log level (which is often the case for debug messages). + Note: this optimization comes with the cost of instantiating the + formatter object itself. It's not really clear which overhead is + heavier, and we may conclude it's actually better to just generate + the strings unconditionally. Alternatively, we can make the stored + address of this object replaceable so that this object can be reused. + Right now this is an open issue. + """ def __init__(self, addr): self.__addr = addr @@ -66,6 +73,9 @@ class ZoneFormatter: message is suppressed because of its log level (which is often the case for debug messages). + See the note for the ClientFormatter class about overhead tradeoff. + This class shares the same discussion. + """ def __init__(self, zname, zclass): self.__zname = zname