When selecting next children of classic nodes, once the node's
end time is past the maximum of the range, it is no use searching
the rest of the children.
Change-Id: I7a1aba410718ea33a84b6a0b109121b0512fd284
Signed-off-by: Geneviève Bastien <gbastien+lttng@versatic.net>
Reviewed-on: https://git.eclipse.org/r/91758
Reviewed-by: Hudson CI
Reviewed-by: Loic Prieur-Drevon <loic.prieur.drevon@ericsson.com>
return Collections.EMPTY_LIST;
}
+ long end = rc.max();
List<Integer> matchingChildren = new LinkedList<>();
/* Check all children except the last one */
for (int i = 0; i < nbChildren - 1; i++) {
if (rc.intersects(childStart, childEnd)) {
matchingChildren.add(i);
}
+ if (end <= childEnd) {
+ return matchingChildren;
+ }
}
/* Check the last child */