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);
    }
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to