Protocol buffer tips

Oct 18, 2010 11:25

 When to use protocol buffers
Basically, use them when you have data you may want to serialize. Don't use them for structs in inner loops, since there's a performance overhead of checking the has_* bits during each access, but if you aren't writing anything that needs to be that tightly optimized, you can just go ahead. PB's are excellent things to stick in tables, but you should also stick some note somewhere of which PB is actually being used, since their wire format doesn't have that data. A lot of the time that's obvious from context, so you needn't worry.
zunger.livejournal.com/164024.html

blog, serializer-deserializer, google, protocol buffer

Previous post Next post
Up