Merge "Delta compression: reuse DeltaTask.getAdjustedWeight()"

This commit is contained in:
Jonathan Nieder 2015-11-04 12:56:42 -05:00 committed by Gerrit Code Review @ Eclipse.org
commit 63e15c7533
2 changed files with 2 additions and 3 deletions

View File

@ -226,7 +226,7 @@ public int compare(WeightedPath a, WeightedPath b) {
}
}
private static int getAdjustedWeight(ObjectToPack o) {
static int getAdjustedWeight(ObjectToPack o) {
// Edge objects and those with reused deltas do not need to be
// compressed. For compression calculations, ignore their weights.
if (o.isEdge() || o.doNotAttemptDelta()) {

View File

@ -1306,8 +1306,7 @@ private void singleThreadDeltaSearch(ProgressMonitor monitor,
long totalWeight = 0;
for (int i = 0; i < cnt; i++) {
ObjectToPack o = list[i];
if (!o.isEdge() && !o.doNotAttemptDelta())
totalWeight += o.getWeight();
totalWeight += DeltaTask.getAdjustedWeight(o);
}
long bytesPerUnit = 1;