A performance analysis of the FlowTransactionScheduler for schedule() and execute() functions.
A transaction caused concern on mainnet indicating the schedule operation and execute both take significant more time to execute than an average transaction, first taking 35ms and second 17ms, compared to average Flow transaction taking ~14ms.
This was dissproved in isolated benchmarking with the following results:
Mean schedule execution time: ~14.2ms
Median schedule execution time: ~13ms
Mean execute execution time: ~2ms
Nonetheless, the analysis was continued to propose a solution that could further decrease schedule execution time by ~25%.
Performance profiling and benchmarking of the FlowTransactionScheduler were conducted using the standard contract currently deployed on mainnet.
To isolate the scheduler's performance, we implemented a contract called TestFlowCallbackHandler featuring an empty handler function.
The scheduling process was initiated via a basic transaction that invokes the schedule method.
TestFlowCallbackHandler.cdc
Schedule.cdc