Merge "Delta compression: reuse DeltaTask.getAdjustedWeight()"
This commit is contained in:
commit
63e15c7533
|
@ -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()) {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue