Browse Source

Merge "Bitmap builder: actually compress EWAH bitmaps in memory"

stable-4.1
Shawn Pearce 9 years ago committed by Gerrit Code Review @ Eclipse.org
parent
commit
349b0af754
  1. 5
      org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexBuilder.java

5
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexBuilder.java

@ -115,6 +115,10 @@ public class PackBitmapIndexBuilder extends BasePackBitmapIndex {
JGitText.get().badObjectType, String.valueOf(type))); JGitText.get().badObjectType, String.valueOf(type)));
} }
} }
commits.trim();
trees.trim();
blobs.trim();
tags.trim();
} }
private ObjectToPack[] sortByOffset(List<ObjectToPack> entries) { private ObjectToPack[] sortByOffset(List<ObjectToPack> entries) {
@ -168,6 +172,7 @@ public class PackBitmapIndexBuilder extends BasePackBitmapIndex {
*/ */
public void addBitmap( public void addBitmap(
AnyObjectId objectId, EWAHCompressedBitmap bitmap, int flags) { AnyObjectId objectId, EWAHCompressedBitmap bitmap, int flags) {
bitmap.trim();
StoredBitmap result = new StoredBitmap(objectId, bitmap, null, flags); StoredBitmap result = new StoredBitmap(objectId, bitmap, null, flags);
getBitmaps().add(result); getBitmaps().add(result);
byAddOrder.add(result); byAddOrder.add(result);

Loading…
Cancel
Save