]> source.dussan.org Git - jgit.git/commit
DfsReader/PackFile: Implement isNotLargerThan using the obj size idx 92/191092/27
authorIvan Frade <ifrade@google.com>
Thu, 30 Dec 2021 16:33:08 +0000 (08:33 -0800)
committerIvan Frade <ifrade@google.com>
Thu, 13 Jul 2023 18:24:17 +0000 (11:24 -0700)
commit9dace2e6d6c4ee8c2ea49cc19fa349a81278b2fc
tree4a2940d34f3b63eb07dbce7fe421641b85dd4f77
parent8a053b57ad5e4fa6b4509e6571dad49e5e80b853
DfsReader/PackFile: Implement isNotLargerThan using the obj size idx

isNotLargerThan() can avoid reading the size of a blob from disk using
the object size idx if available.

Load the object size index in the DfsPackfile following the same
pattern than the other indices. Override isNotLargerThan in DfsReader
to use the index when available.

Following CL introduces the writing of the object size index and the
tests cover this code.

Change-Id: I15c95b84c1424707c487a7d29c5c46b1a9d0ceba
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DfsReaderTest.java [new file with mode: 0644]
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReader.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReaderIoStats.java