Scripting performance is worse when performing operations in tickingareas (outside of sim distance)
Partner Rank: 2
Partner Team Reporting: Jigarbov Productions
Verification Builds: 1.20.30
Regression Builds: cant test earlier versions because its using new scripting apis
Summary: Scripting performance is worse when performing operations in tickingareas (outside of sim distance)
Affects currently Live Content: No, upcoming.
Impact: Performance impacts when there shouldn't be makes developing content that runs smoothly more difficult and time consuming. It can result in content review fails when there shouldn't be and can cause delays in content being published.
Repro Steps:
- Download test world sent to greggo
- run /tp @s 9 114 -69 1 23
- run the command /scriptevent xxx 1
- run the command again, increasing the value of 1 by 1
- keep doing 4 until you see a content log error "[scripting][warning]-[watchdog] Slow running script detected in behavior pack 'Cotta Behavior Pack'(numbers ms average)
Observed Results:
with low numbers, you may nor observe any content error log. As you increase the number, and watch the play field updating, youll notice as the blocks update further away from you at the border of the simulation distance and the tickingarea the content log error will trip.
On Nintendo Switch this happens between 1 and 2. on my development pc it happens between 9 and 10. Results may vary depending on the power of hardware, but it is consistent that the script that is updating the blocks triggers the warning when it crosses the threshold between simulation distance and tickingareas.
It even shows that on Nintendo Switch where the sim distance is 4, (vs my dev environment which is 6) the content log error trips earlier which is consistent with the theory.
Expected Results:
to be honest i would have expected tickingareas to run even better outside of simulation distance since i would have imagined they would have less processing overhead. but at the very least they should be consistent.
Screenshots/Videos attached: yes, greggo has link