I'm not sure I understand. I think you are using the word "group" to mean something different than what it means in the .proto language. At least, I hope so, because the "group" in the .proto language is deprecated.
Are you suggesting that the parser should automatically intern every String that it parses? That sounds like it could be expensive for those who don't need it. Maybe you should re-design your data structure so that it doesn't end up containing lots of copies of the same strings? On Tue, Jan 19, 2010 at 1:23 AM, Kalle Kärkkäinen <kalle.karkkai...@me.com>wrote: > Hi, > > I'm modeling contracts that need to reside in a group. Groups are > strings, basically. > > I've got rather many contracts, and I was thinking if it was possible > to have strings interned so they would take less memory. Since this > would be a load time change (load string up, intern it, and use what > ever that produced) I see little chance of getting it done good with > option extensions. (which I think are really just tags??) > > It would be difficult (although not impossible) to model groups as > numbered-ids and have different message for them. > > In my domain, I'd be left with the bigger problem of handling > uniqueness of the id (name would be superficially easier to guarantee > unique). > > What say you? Would interned strings be reasonable java enhancement? > > -- > You received this message because you are subscribed to the Google Groups > "Protocol Buffers" group. > To post to this group, send email to proto...@googlegroups.com. > To unsubscribe from this group, send email to > protobuf+unsubscr...@googlegroups.com<protobuf%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/protobuf?hl=en. > > > >--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To post to this group, send email to proto...@googlegroups.com.
To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.