[protobuf] intern strings in java

2010-01-19 Thread Kalle Kärkkäinen
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

[protobuf] Re: intern strings in java

2010-01-19 Thread Kalle Kärkkäinen
wards having each contract carry an int, specifying 'id' of such ContractGroup. > > On Tue, Jan 19, 2010 at 1:23 AM, Kalle Kärkkäinen > wrote: > > > > > Hi, > > > I'm modeling contracts that need to reside in a group. Groups are > > strings, b

[protobuf] analysing field sizes

2010-01-26 Thread Kalle Kärkkäinen
Hi, Is there some way to analyse field sizes? I've got a structure that contains some 5000 - 1 records and I'd really like to know what takes up the space. It is not problematic at this point, total size is under 500k, but knowing the ratio per field would help. I've calculated current data wi