]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[1512] added note about overhead tradeoff for the formatter classes.
authorJINMEI Tatuya <jinmei@isc.org>
Wed, 23 May 2012 16:35:28 +0000 (09:35 -0700)
committerJINMEI Tatuya <jinmei@isc.org>
Wed, 23 May 2012 16:35:28 +0000 (09:35 -0700)
src/lib/python/isc/ddns/logger.py

index e4f5ed8ba9e0e1caf8f363a4881ab4635b2f8e95..9e92a9fdcb6459b5ba52c6fc9b2e14409ca52380 100644 (file)
@@ -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