It previously had to iterate over EVERY task in its list every time. With lots of queued tasks that is slow.
Instead we sort it by schedule time. That means when iterating thru list, if we get to a single task that is in the future, so are all remaining.