Browse Source
Rather than holding onto the PackedObjectLoader, only hold the PackFile and the object offset. During a reuse copy that is all we should need to complete a reuse, and the other parts of the PackedObjectLoader just waste memory. This change reduces the per-object memory usage of a PackWriter by 32 bytes on a 32 bit JVM using only OFS_DELTA formatted objects. The savings is even larger (by another 20 bytes) for REF_DELTAs. This is close to a 50% reduction in the size of ObjectToPack, making it rather worthwhile to do. Beyond the memory reduction, this change will help to make future refactoring work easier. We need to redo the API used to support copying data, and disconnecting it from the PackedObjectLoader is a good first step. Change-Id: I24ba4e621e101f14e79a16463aec5379f447aa9b Signed-off-by: Shawn O. Pearce <spearce@spearce.org>stable-0.8
Shawn O. Pearce
15 years ago
1 changed files with 23 additions and 21 deletions
Loading…
Reference in new issue