-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Change the getVisibleElements
helper function to take a parameter object
#12572
Change the getVisibleElements
helper function to take a parameter object
#12572
Conversation
…bject Given the number of parameters, and the fact that many of them are booleans, the call-sites are no longer particularly easy to read and understand. Furthermore, this slightly improves the formatting of the JSDoc-comment, since it needed updating as part of these changes anyway. Finally, this removes an unnecessary `numViews === 0` check from `getVisibleElements`, since that should be *very* rare and more importantly that the `binarySearchFirstItem` function already has a fast-path for that particular case.
/botio test |
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://3.101.106.178:8877/5059468b68a4658/output.txt |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.67.70.0:8877/b107286410dd485/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.67.70.0:8877/b107286410dd485/output.txt Total script time: 25.03 mins
Image differences available at: http://54.67.70.0:8877/b107286410dd485/reftest-analyzer.html#web=eq.log |
From: Bot.io (Windows)FailedFull output at http://3.101.106.178:8877/5059468b68a4658/output.txt Total script time: 28.92 mins
Image differences available at: http://3.101.106.178:8877/5059468b68a4658/reftest-analyzer.html#web=eq.log |
/botio-linux preview |
From: Bot.io (Linux m4)ReceivedCommand cmd_preview from @timvandermeij received. Current queue size: 0 Live output at: http://54.67.70.0:8877/0e5f3fd8b6ebfd9/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/0e5f3fd8b6ebfd9/output.txt Total script time: 4.05 mins Published |
Thanks! I really like this improvement. |
Given the number of parameters, and the fact that many of them are booleans, the call-sites are no longer particularly easy to read and understand. Furthermore, this slightly improves the formatting of the JSDoc-comment, since it needed updating as part of these changes anyway.
Finally, this removes an unnecessary
numViews === 0
check fromgetVisibleElements
, since that should be very rare and more importantly that thebinarySearchFirstItem
function already has a fast-path for that particular case.