Frankly I'm surprised so many people care about the generated code
size - I'm generally much more interested in speed.
For example, I suspect your C unpack() could be optimized quite a bit
by using a custom allocator. Another example: probably the only
change I'm likely to make to protobuf-c in the forseeable future is a
rewrite of "pack()" to optimize packing of submessages... well, and
i'll probably need to follow protobuf if it implements packed repeated
fields (another great optimization).
If I were designing a C++ protobuf, I'd probably use the strategy I
used for protobuf-c: make the reflection data so efficient and easy
that you can optimize the hell out of the reflection-based api,
thereby:
- only needs one copy of the pack/unpack code, in the core library
- eliminate the difference between optimize for speed or size -- it's
really possible to do both!
- minimizes the generated code to be practically nothing but
introspection data
- in theory, one could bind the C objects could to other languages
using the reflection api
Unfortunately, some amount of bloat is inherent in the C++ tradition
of using accessor methods for the various members. More bloat from
std::string. etc. So I'm not sure you "lite" you can get w/o making
a completely incompatible version.
- dave
> test1.tgz
> 2KViewDownload