[
https://issues.apache.org/jira/browse/JENA-1212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15384216#comment-15384216
]
ASF GitHub Bot commented on JENA-1212:
--------------------------------------
Github user ajs6f commented on the issue:
https://github.com/apache/jena/pull/157
I'm not sure what the point of the periodic cancellation checking machinery
is. It seems like it is left over from your diagnostics. It doesn't seem to
save any time, because the test `count % cancelTestFrequency == 0` is more
expensive than the test it is guarding `(cancelled)`. How about getting rid of
`cancelTestFrequency` and `compare` just being:
```
@Override public int compare(E o1, E o2) {
if (cancelled) throw new AbandonSort();
return baseComparator.compare(o1, o2);
}
```
> allow ORDER BY sort to be cancelled
> -----------------------------------
>
> Key: JENA-1212
> URL: https://issues.apache.org/jira/browse/JENA-1212
> Project: Apache Jena
> Issue Type: Improvement
> Components: ARQ
> Reporter: christopher james dollin
> Priority: Minor
> Fix For: Jena 3.1.1
>
>
> When a query with an ORDER BY is cancelled, the component
> Arrays.sort() that sorts the chunk(s) of the result
> bindings runs to completion before the cancel finishes.
> [See QueryIterSort and SortedDataBag.]
> For a large result set, this results in a long wait
> before the cancelled request finally finishes. This
> can be inconvenient.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)