BIND 10 #1697: extend MessageRenderer so we can replace the output buffer

BIND 10 Development do-not-reply at isc.org
Wed Feb 29 12:42:28 UTC 2012


#1697: extend MessageRenderer so we can replace the output buffer
-------------------------------------+-------------------------------------
                   Reporter:         |                 Owner:  jinmei
  jinmei                             |                Status:  reviewing
                       Type:  task   |             Milestone:
                   Priority:  major  |  Sprint-20120306
                  Component:         |            Resolution:
  libdns++                           |             Sensitive:  0
                   Keywords:         |           Sub-Project:  DNS
            Defect Severity:  N/A    |  Estimated Difficulty:  9
Feature Depending on Ticket:  auth   |           Total Hours:  1.90
  performance                        |
        Add Hours to Ticket:  0      |
                  Internal?:  0      |
-------------------------------------+-------------------------------------
Changes (by vorner):

 * owner:  vorner => jinmei
 * totalhours:  0 => 1.90


Comment:

 Hello

 Replying to [comment:8 jinmei]:
 > I'm not sure what exactly you mean by "each time", but it does create
 > two buffers if the application explicitly sets a dedicated buffer to
 > a renderer by setBuffer().  I wanted to make sure that
 > `AbstractMessageRenderer::buffer_` is always non NULL and also allow
 > the application not to set a buffer explicitly when it doesn't have to
 > replace the buffer every time (or, as a special case of it, when it
 > just needs to use the renderer one time).
 >
 > For an application that wants to keep reusing the renderer while
 > switching the output buffer, the initially created private buffer is a
 > waste.  But I thought it's acceptable because an empty buffer is
 > pretty lightweight, and the one time creation overhead should be
 > marginale when the render is reused.

 OK, so in the case both the renderer and the buffer are to be reused, it
 is very nice. In case someone creates a new renderer and new buffer each
 time, two buffers are created (which is what is happening in auth now, I
 think). I guess this is about to be changed, but if it wasn't, I think we
 might want to do some kind of lazy initialization, or something. But that
 would be a different ticket, if any at all.

 > To be honest, I didn't 100% understand how these buffers are used
 > beyond how they are commented:

 OK, no problem.

 > I've fixed other editorial errors.  Thanks for pointing out them.

 I think it can be merged.

-- 
Ticket URL: <http://bind10.isc.org/ticket/1697#comment:10>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list