diff options
author | Dave Borowitz <dborowitz@google.com> | 2017-10-31 10:05:29 -0400 |
---|---|---|
committer | Dave Borowitz <dborowitz@google.com> | 2017-11-01 12:40:53 -0400 |
commit | f7ceeaa23f98f671848a8446c324d0d96800d5db (patch) | |
tree | 563af1e5d127aaa142de8a8fb480bf79efce2df6 /.gitignore | |
parent | 5ce1cc3d43a85acfaa2237968dd0d2a29beb07b0 (diff) | |
download | jgit-f7ceeaa23f98f671848a8446c324d0d96800d5db.tar.gz jgit-f7ceeaa23f98f671848a8446c324d0d96800d5db.zip |
FileRepository: Add pack-based inserter implementation
Applications that use ObjectInserters to create lots of individual
objects may prefer to avoid cluttering up the object directory with
loose objects. Add a specialized inserter implementation that produces a
single pack file no matter how many objects. This inserter is loosely
based on the existing DfsInserter implementation, but is simpler since
we don't need to buffer blocks in memory before writing to storage.
An alternative for such applications would be to write out the loose
objects and then repack just those objects later. This operation is not
currently supported with the GC class, which always repacks existing
packs when compacting loose objects. This in turn requires more
CPU-intensive reachability checks and extra I/O to copy objects from old
packs to new packs.
So, the choice was between implementing a new variant of repack, or not
writing loose objects in the first place. The latter approach is likely
less code overall, and avoids unnecessary I/O at runtime.
The current implementation does not yet support newReader() for reading
back objects.
Change-Id: I2074418f4e65853b7113de5eaced3a6b037d1a17
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions