Browse Source

[1455] Added notes about possible optimizations

As per review comment http://bind10.isc.org/ticket/1455#comment:15
Jelte Jansen 13 years ago
parent
commit
c73ca19a68
2 changed files with 15 additions and 0 deletions
  1. 3 0
      src/lib/python/isc/ddns/logger.py
  2. 12 0
      src/lib/python/isc/ddns/session.py

+ 3 - 0
src/lib/python/isc/ddns/logger.py

@@ -89,6 +89,9 @@ class RRsetFormatter:
     This class is designed to delay the conversion until it's explicitly
     requested, so the conversion doesn't happen if the corresponding log
     message is suppressed because of its log level.
+
+    See the note for the ClientFormatter class about overhead tradeoff.
+    This class shares the same discussion.
     """
     def __init__(self, rrset):
         self.__rrset = rrset

+ 12 - 0
src/lib/python/isc/ddns/session.py

@@ -199,6 +199,12 @@ class UpdateSession:
            TTL, and Rdata (if any) of the given RRset are ignored.
            RFC2136 Section 2.4.1.
            Returns True if the prerequisite is satisfied, False otherwise.
+
+           Note: the only thing used in the call to find() here is the
+           result status. The actual data is immediately dropped. As
+           a future optimization, we may want to add a find() option to
+           only return what the result code would be (and not read/copy
+           any actual data).
         '''
         _, finder = datasrc_client.find_zone(rrset.get_name())
         result, _, _ = finder.find(rrset.get_name(), rrset.get_type(),
@@ -246,6 +252,12 @@ class UpdateSession:
            1 or more RRs).
            RFC2136 Section 2.4.4
            Returns True if the prerequisite is satisfied, False otherwise.
+
+           Note: the only thing used in the call to find_all() here is
+           the result status. The actual data is immediately dropped. As
+           a future optimization, we may want to add a find_all() option
+           to only return what the result code would be (and not read/copy
+           any actual data).
         '''
         _, finder = datasrc_client.find_zone(rrset.get_name())
         result, rrsets, flags = finder.find_all(rrset.get_name(),