We should optimise the check that is always performed at the begining of process() function to not check the first item in the array, but instead hold the first item in array cached in a variable. This way the loading of array from storage is avoided thus reducing the execution effort used.
https://github.com/onflow/flow-core-contracts/blob/master/contracts/FlowTransactionScheduler.cdc#L483