Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SUMMARY
This is a series of refactorings split into separate, fairly simple, commits for easier review. The benefits are:
PlayIterator
code is being removed.HostState
copying this PR introduces it might be interesting to see as well.PlayIterator
and should not be visible to its users.There are more things to improve, I have mentioned some of them in FIXMEs/TODOs but this isn't small as-is so leaving them for next time.
ISSUE TYPE
ADDITIONAL INFORMATION
Iterating through
N
nested blocks, each block has one task and a nested block, the most nested block is being failed.Before:
0.00024080276489257812 seconds, 10 blocks
0.004384040832519531 seconds, 50 blocks
0.9080429077148438 seconds, 350 blocks
19.866453170776367 seconds, 992 blocks (I believe 992 was a limit for
devel
to handle)After:
0.00009512901306152344 seconds, 10 blocks
0.0005481243133544922 seconds, 50 blocks
0.01589512825012207 seconds, 350 blocks
0.11786723136901855 seconds, 992 blocks