-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Remove the only remaining Dict_getAll
usage (in evaluator.js) and the method itself
#6982
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove the only remaining Dict_getAll
usage (in evaluator.js) and the method itself
#6982
Conversation
For the operators that we currently support, the arguments are not `Dict`s, which means that it's not really necessary to use `Dict_getAll` in `EvaluatorPreprocessor_read`. Also, I do think that if/when we support operators that use `Dict`s as arguments, that should be dealt with in the corresponding `case` in `PartialEvaluator_getOperatorList` which handles the operator. The only reason that I can find for using `Dict_getAll` like that, is that prior to PR 6550 we would just append certain (currently unsupported) operators without doing any further processing/checking. But as issue 6549 showed, that can lead to issues in practice, which is why it was changed. In an effort to prevent possible issue with unsupported operators, this patch simply ignores operators with `Dict` arguments in `PartialEvaluator_getOperatorList`.
`Dict_getAll` is problematic for a number of reasons. First of all, as issue 6961 shows, it can be really bad for performance, since it dereferences all indirect objects. Second of all, all the derefencing can lead to data being unncessarily requested when ranged/chunked loading is used, thus unnecessarily delaying rendering. Note: For cases where `Dict_getAll` was previously used, `Dict_getKeys` in combination with `Dict_get` can be used instead. This has the advantage that data isn't requested until it's actually needed.
/botio test |
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://107.22.172.223:8877/0977d53272f1075/output.txt |
From: Bot.io (Linux)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://107.21.233.14:8877/b4594262b93d9b9/output.txt |
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/0977d53272f1075/output.txt Total script time: 20.08 mins
|
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/b4594262b93d9b9/output.txt Total script time: 21.94 mins
|
/botio-linux preview |
From: Bot.io (Linux)ReceivedCommand cmd_preview from @timvandermeij received. Current queue size: 0 Live output at: http://107.21.233.14:8877/a9c84a63fe5648e/output.txt |
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/a9c84a63fe5648e/output.txt Total script time: 0.87 mins Published |
Remove the only remaining `Dict_getAll` usage (in evaluator.js) and the method itself
Thank you! |
load
test for issue 6549getAll
fromEvaluatorPreprocessor_read
Remove
Dict_getAll
since it is now unused