This PR demonstrates how one might effect "proportionality" in idle merge effort. The method reduced is use to indicate whether there is more work to do, and whether idle merging should re-schedule the arrangement operator. This PR changes the logic from "if any work at all exists" to "if any work exists between proportionally sized batches". This is not meant to be a perfect rule, nor a perfect constant, but a starting point to experiment with a reduction in CPU use when there is not a substantial amount of work to do.
There is a further reduction one could make to only look for proportionality between the largest non-empty batch and those below it, which would defer work until there was at least some proportional reduction in the total size of the arrangement, rather than among intermediate batches.
This PR demonstrates how one might effect "proportionality" in idle merge effort. The method
reduced
is use to indicate whether there is more work to do, and whether idle merging should re-schedule the arrangement operator. This PR changes the logic from "if any work at all exists" to "if any work exists between proportionally sized batches". This is not meant to be a perfect rule, nor a perfect constant, but a starting point to experiment with a reduction in CPU use when there is not a substantial amount of work to do.There is a further reduction one could make to only look for proportionality between the largest non-empty batch and those below it, which would defer work until there was at least some proportional reduction in the total size of the arrangement, rather than among intermediate batches.
@antiguru @teskje