do not sort arrays again if arrays are already sorted

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7845 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 14 years ago
parent 3d043ce9d6
commit 6a6f27eaf3

@ -146,7 +146,7 @@ public class Array {
job.latch.countUp();
} catch (final InterruptedException e) {
} else {
sort(nextJob, threaded);
sort(nextJob, false);
}
}
if ((s = d - c) > 1) {
@ -156,7 +156,7 @@ public class Array {
job.latch.countUp();
} catch (final InterruptedException e) {
} else {
sort(nextJob, threaded);
sort(nextJob, false);
}
}
}

@ -613,8 +613,9 @@ public class RowCollection implements Sortable<Row.Entry>, Iterable<Row.Entry>,
}
public final void sort() {
if (this.sortBound == this.chunkcount) return; // this is sorted
net.yacy.cora.storage.Array.sort(this);
this.sortBound = size();
this.sortBound = this.chunkcount;
}
public static class partitionthread implements Callable<Integer> {

Loading…
Cancel
Save