Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jgit-dev] PackFile and PackIndex size


I wonder how a size of PackIndex and PackFile objects is related
to the size of pack-* and idx files?

Suppose I run a code:

RevWalk walk = new RevWalk(db);
try {
} finally {

and the method ObjectDirectory.scanPacksImpl() creates a PackFile
object for every found pack-* file. If we have a lot of pack
files - a lot of such objects created.

After running 'git gc' I get single big pack and big index. Since
PackIndex and PackFile are allocated on the stack it is hard to
understand if one big file is better for memory usage than a lot
of small files.

The outline of the tutorial on
RevWalk (
contains section on reducing memory usage. Could you provide some
hints on how to do that? Thanks!


Back to the top