Commit c73ca19a authored by Jelte Jansen's avatar Jelte Jansen

[1455] Added notes about possible optimizations

As per review comment http://bind10.isc.org/ticket/1455#comment:15
parent f621147e
...@@ -89,6 +89,9 @@ class RRsetFormatter: ...@@ -89,6 +89,9 @@ class RRsetFormatter:
This class is designed to delay the conversion until it's explicitly This class is designed to delay the conversion until it's explicitly
requested, so the conversion doesn't happen if the corresponding log requested, so the conversion doesn't happen if the corresponding log
message is suppressed because of its log level. 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): def __init__(self, rrset):
self.__rrset = rrset self.__rrset = rrset
......
...@@ -199,6 +199,12 @@ class UpdateSession: ...@@ -199,6 +199,12 @@ class UpdateSession:
TTL, and Rdata (if any) of the given RRset are ignored. TTL, and Rdata (if any) of the given RRset are ignored.
RFC2136 Section 2.4.1. RFC2136 Section 2.4.1.
Returns True if the prerequisite is satisfied, False otherwise. 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()) _, finder = datasrc_client.find_zone(rrset.get_name())
result, _, _ = finder.find(rrset.get_name(), rrset.get_type(), result, _, _ = finder.find(rrset.get_name(), rrset.get_type(),
...@@ -246,6 +252,12 @@ class UpdateSession: ...@@ -246,6 +252,12 @@ class UpdateSession:
1 or more RRs). 1 or more RRs).
RFC2136 Section 2.4.4 RFC2136 Section 2.4.4
Returns True if the prerequisite is satisfied, False otherwise. 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()) _, finder = datasrc_client.find_zone(rrset.get_name())
result, rrsets, flags = finder.find_all(rrset.get_name(), result, rrsets, flags = finder.find_all(rrset.get_name(),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment