BIND 10 #1764: make SyncUDPServer even more simpler (and probably faster)

BIND 10 Development do-not-reply at isc.org
Wed Mar 7 04:31:42 UTC 2012


#1764: make SyncUDPServer even more simpler (and probably faster)
-------------------------------------+-------------------------------------
            Reporter:  jinmei        |                        Owner:
                Type:  task          |                       Status:  new
            Priority:  high          |                    Milestone:  Next-
           Component:  b10-auth      |  Sprint-Proposed
           Sensitive:  0             |                     Keywords:
         Sub-Project:  DNS           |              Defect Severity:  N/A
Estimated Difficulty:  0             |  Feature Depending on Ticket:  auth
         Total Hours:  0             |  performance
                                     |          Add Hours to Ticket:  0
                                     |                    Internal?:  0
-------------------------------------+-------------------------------------
 From a quick look, the `SyncUDPServer` class can be more cleaned up,
 some of which I suspect contributes to non negligible performance
 improvement.

 First off, about the concept: when I first named "sync", I meant the
 "lookup callback" complete everything, and other asynchronous
 considerations (such as getting CC messages) should be done elsewhere.
 Therefore,
 - It shouldn't take "checkin_callback" parameter (at least auth should
   pass NULL)
 - It shouldn't take "answer_callback" parameter (again, at least auth
   should pass NULL)
 - it doesn't need "answer_" member variable ("query_" should contain a
   response to be sent back on return of "lookup_callback_")
 - "stopped" doesn't have to be checked within handleRead().

 In addition, 'socket' doesn't have to be constructed every time: it
 can be initialized on consturction with socket_ and should be reusable
 throughout the class object's lifetime.  There can be several similar
 points that can be cleaned up this way.

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


More information about the bind10-tickets mailing list