[Xapian-tickets] [Xapian] #471: Pass codes not strings for Xapian::Error subclasses in remote protocol

Xapian nobody at xapian.org
Wed Apr 28 05:50:46 BST 2010


#471: Pass codes not strings for Xapian::Error subclasses in remote protocol
----------------------------+-----------------------------------------------
 Reporter:  olly            |       Owner:  olly     
     Type:  enhancement     |      Status:  new      
 Priority:  normal          |   Milestone:  1.3.0    
Component:  Backend-Remote  |     Version:  SVN trunk
 Severity:  normal          |   Blockedby:           
 Platform:  All             |    Blocking:           
----------------------------+-----------------------------------------------
 Currently the remote protocol passes the name of the error subclass in the
 remote protocol.  It would be better overall to assign numeric codes and
 pass these because:

  * We could have a switch on a compact range of integers in the client,
 rather than a series of string compares which should be more compact and
 faster.
  * Smaller message size, though this isn't a performance sensitive case.

 The only downside I see is the small maintenance overhead of having to
 maintain an enumeration, but it isn't like we add or remove error classes
 very often at all.

 Requires a major remote protocol bump, so milestone:1.3.0 (unless we
 require a major remote protocol bump for some other reason during 1.2.x).

-- 
Ticket URL: <http://trac.xapian.org/ticket/471>
Xapian <http://xapian.org/>
Xapian



More information about the Xapian-tickets mailing list