Open AtlasLinden opened 1 month ago
I'd be curious if you replace LL.sleep(0.1)
with:
Timer = (require 'timers').Timer
...
Timer(0.1, 'wait')
A pending changeset removes LL.sleep()
, which is undesirable for a Lua script because it blocks the whole script, instead of blocking just the calling Lua coroutine.
Another pending changeset presents (e.g.) timers.sleep(0.1)
, instead of the above Timer(0.1, 'wait')
API.
Fixing https://github.com/secondlife/viewer/issues/2884 should have fixed this one too (or at least significantly improve performance). I can now run 20-30 scripts from the description without getting freeze.
Environment
Second Life Release 7.1.12.11247901645 (Develop+Lua build)
Description
Running many ongoing scripts at once can cause the performance to drop considerably. How many is many? This depends on the script.
Reproduction steps
Here's a script that can cause this performance drop after running only a few copies of it consecutively (may depend on machine for exact number):
A clip of multiple copies of this script running: https://gyazo.com/81abbb41d5a26ff9c0968bf0150dcb18