[Xapian-tickets] [Xapian] #471: Pass codes not strings for Xapian::Error subclasses in remote protocol
Xapian
nobody at xapian.org
Wed Jun 15 16:56:47 BST 2011
#471: Pass codes not strings for Xapian::Error subclasses in remote protocol
----------------------------+-----------------------------------------------
Reporter: olly | Owner: olly
Type: enhancement | Status: closed
Priority: normal | Milestone: 1.3.0
Component: Backend-Remote | Version: SVN trunk
Severity: normal | Resolution: fixed
Keywords: | Blockedby:
Platform: All | Blocking:
----------------------------+-----------------------------------------------
Changes (by olly):
* status: new => closed
* resolution: => fixed
Old description:
> 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).
New description:
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).
--
Comment:
Fix in trunk r15664.
--
Ticket URL: <http://trac.xapian.org/ticket/471#comment:1>
Xapian <http://xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list