Ämne: Re: [dcdev] Re: New Encoding Scheme First |
Från: Jan Vidar Krey |
Datum: 2003-12-01 1:36 |
Till: Direct Connect developers |
I would have to say that it's _much_ harder to debug if you have to
know in advance how many characters you will type, especially if you
have to type the length in binary format (which for most terminal
emulators is impossible).
Using a pure text based protocols also makes it simpler to use
standard UNIX tools to parse debug information and so on, so at least
in my mind, using a completely text based protocol has many
advantages.
Personally, I would be pleased to see escaping with both backslashes
and double quotes, but that might just be me, or does anyone else
agree?
In any case, when it comes to CPU usage, I believe there are far worse
CPU hogs in a DC client. Stuff like searching and file hashing, and
possibly even translation back and forth from UTF-8 are likely to take
much more CPU than command parsing no matter how much you optimize them
and no matter how many quoting styles you allow in the command
parser. Since it is that way, I'd say that it's preferable to ease
debugging as much as possible before simplifying the command parser
for speed.