git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6376 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 15 years ago
parent f8371707e5
commit 51f2bbf04b

@ -535,10 +535,13 @@ public class RowCollection implements Iterable<Row.Entry> {
} }
final byte[] swapspace = new byte[this.rowdef.objectsize]; final byte[] swapspace = new byte[this.rowdef.objectsize];
final int p = partition(0, this.chunkcount, this.sortBound, swapspace); final int p = partition(0, this.chunkcount, this.sortBound, swapspace);
if ((sortingthreadexecutor != null) && if (sortingthreadexecutor != null &&
(!sortingthreadexecutor.isShutdown()) && !sortingthreadexecutor.isShutdown() &&
(serverProcessor.useCPU > 1) && serverProcessor.useCPU > 1 &&
(this.chunkcount > 8000)) { this.chunkcount > 8000 &&
p > isortlimit * 5 &&
this.chunkcount - p > isortlimit * 5
) {
// sort this using multi-threading // sort this using multi-threading
final Future<Integer> part0 = partitionthreadexecutor.submit(new partitionthread(this, 0, p, 0)); final Future<Integer> part0 = partitionthreadexecutor.submit(new partitionthread(this, 0, p, 0));
final Future<Integer> part1 = partitionthreadexecutor.submit(new partitionthread(this, p, this.chunkcount, p)); final Future<Integer> part1 = partitionthreadexecutor.submit(new partitionthread(this, p, this.chunkcount, p));

Loading…
Cancel
Save