Merge pull request #8530 from lightsofapollo/perf-blocks

Bug 846302 - Use generator "tasks" instead of for loops and delay(cherry picked from commit 4582a3d40740981b1c642550a6482c5568df24d5)