From c73ca19a68d8e55dd3c07e4a92a4132f4f075892 Mon Sep 17 00:00:00 2001 From: Jelte Jansen Date: Fri, 25 May 2012 12:29:13 +0200 Subject: [PATCH] [1455] Added notes about possible optimizations As per review comment http://bind10.isc.org/ticket/1455#comment:15 --- src/lib/python/isc/ddns/logger.py | 3 +++ src/lib/python/isc/ddns/session.py | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/src/lib/python/isc/ddns/logger.py b/src/lib/python/isc/ddns/logger.py index f8a7f6654f..362b22b58c 100644 --- a/src/lib/python/isc/ddns/logger.py +++ b/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 diff --git a/src/lib/python/isc/ddns/session.py b/src/lib/python/isc/ddns/session.py index 5374790d85..51da0e9fb4 100644 --- a/src/lib/python/isc/ddns/session.py +++ b/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(), -- GitLab