Input device design

Joe Krahn krahn at niehs.nih.gov
Wed Aug 31 14:42:11 PDT 2005


Alan Cox wrote:
> On Mer, 2005-08-31 at 10:36 -0400, Jim Gettys wrote:
>  > That implies that a XML text format had better be compressed (XML
>  > compresses extremely well, but we should get some actual numbers).
>  > Don't presume binary protocols are more compact than text ones, btw:
>  > IIOP (the infamous CORBA wire protocol) has a minimum message size of >
>  > 100 bytes!!!
> 
> Equally compression can cost you vast amounts of resources and CPU cache
> footprint while upping latency. Not having to do the work in the first
> place is cheaper than compression.

I agree. Compression is a poor work-around for doing it wrong to start with.

One idea I have considered is to use XML to describe a device. This can 
be rather verbose, with no overhead concerns. Actual events can be 
compact and rather simple. For example, the device description can say 
that valuator 1 is "X Rotation", but there's no need to send the text "X 
Rotation" for every event instead of the binary number 1.

In the current plan, an external device manager can tell X about a new 
device using a verbose XML description. Then, X accesses the device 
directly. The generic event syntax is not needed, except for network or 
software-emulated devices.

Joe



More information about the xorg mailing list