Break executeCommands into functions #12058
Draft
+659
−349
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.
The
Scene.executeCommands
function had >400 lines and did ... a lot of things, with a lot of redundant redundancy. Sometimes obvious, around the pattern(with
commands
,length
, andj
being defined at function scope and re-assigned all over the place). Sometimes, with subtle differences, where the above block was justThis PR breaks the
executeCommands
function into smaller blocks, reducing redundancy, adding comments etc.This was just quickly written down. while trying to roughly understand some aspects of what's going on there. So this PR is rather some sort of "internal notes", and opened as a DRAFT, and will likely be closed without merging. The main reason for opening it is to ask whether "something like this" could be considered to be of value (and whether it should be reviewed and tested with the goal to bring it into a mergeable state), or whether such a change is "too drastic" and contains too many risks for bugs to ever be merged anyhow.