Larry Johnson wrote:
Spare memory went from 800K to 5.7M, merely by partitioning the data as you suggested. I'm taking baby steps and am packing just 20 records at a time.
Well, that should be enough to reduce the overhead to 5% of what it was before, which may be good enough for a lot of purposes.
DmQueryRecord returns a MemHandle, and I thought about calling MemHandleSize. But I'm not sure if this is accurate. I need to know the size of the last record (which packs several actual records).
I've used MemHandleSize() on PDB records, and I've never had a problem doing that. In fact, I can't think of another way to do it, other than to encode the size yourself.
The alternative is to write a recordsize record at the beginning or end of the pdb, but that just doesn't seem right.
It's not that bad a thing. You could put the record count and the number of records packed into each PBB record as fields in record #0. It makes the math a bit less clean, but it also gives you the flexibility to choose how many of your records get packed into each record when you build the PDB without having to change the PRC, which could be useful if you're building the PDB on some other device, like on a desktop computer or something. - Logan -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
