Jump to content

time dilation and script load


WineOtter
 Share

You are about to reply to a thread that has been inactive for 148 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

After I got multiple automated tells in some of the Fantasy Faire shopping zones that my scripts were causing lag with a running time of over 0.2 ms, I tried testing them myself. None of the existing script load measuring objects I knew about in-world report time load, so I looked up some code samples and threw this together:

default
{
    touch_start(integer total_number)
    {
        list AttachedUUIDs = llGetAttachedList(llGetOwner());
        integer i = 0;
        float total = 0.0;
        while (i < llGetListLength(AttachedUUIDs) )
        {
            list temp = llGetObjectDetails(llList2Key(AttachedUUIDs, i), [OBJECT_SCRIPT_TIME]);
            total += 1000.0 * llList2Float(temp, 1);
            ++i;
        }
        llOwnerSay("total ms: " + (string)total);
    }
}

Right after I zoned into a Faire sim it reported 0.11 ms, but since then it's bounced between 0.045 and 0.065.

Now, the docs do say this is average over the last 30 seconds or however long I've been in the zone, whichever is less. They also say it excludes HUD attachments (because llGetAttachedList() doesn't include those and I don't see another LSL function to fetch them), so I don't know if I'm measuring the same thing, but I don't know how I was getting measured as causing so much load. Can anyone help me out?

Edited by WineOtter
Link to comment
Share on other sites

if  the Fair script is only scanning each visitor one time (on first detection) then to get the result that is, it will be that the time period between first detection and scan is zero

what a one time scanner should do is wait about a minute between first detection and scan (for the reason that you mention)

Edited by Mollymews
do
Link to comment
Share on other sites

2 minutes ago, Mollymews said:

what a one time scanner should do is wait about a minute between detection and scan (for the reason that you mention)

... especially since you were probably first detected when you entered the region, which is when all sorts of scripts in your attachments are likely to wake up and do something.  Your greatest load on region servers is in the first seconds after you arrive.  It's dumb to make decisions about your "normal" script load right away.

  • Like 2
Link to comment
Share on other sites

2 minutes ago, Rolig Loon said:

... especially since you were probably first detected when you entered the region, which is when all sorts of scripts in your attachments are likely to wake up and do something.  Your greatest load on region servers is in the first seconds after you arrive.  It's dumb to make decisions about your "normal" script load right away.

agree

whenever I read about popular places messing up their doorman script and unnecessarily upsetting their patrons, I start getting a itchy brain. And I sometimes think I should write and post the cure for itchy brain, as a public service. A public service for the public who get accosted by these overzealous doormen

  • Like 1
Link to comment
Share on other sites

Posted (edited)
29 minutes ago, Mollymews said:

if  the Fair script is only scanning each visitor one time (on first detection) then to get the result that is, it will be that the time period between first detection and scan is zero

It happened twice. The first was after more than a minute, and the second was at least five minutes in. The second also reported a higher load off fewer scripts because I'd removed some items.

Edited by WineOtter
Link to comment
Share on other sites

43 minutes ago, sandi Mexicola said:

If you are using FS, you can right-click your tag, and in the menu there is a "Scripts" option that will tell you various things about all of the scripts you are running, including the total time used. 

Thanks! That's coming back consistently with about 0.065 ms.

  • Like 1
Link to comment
Share on other sites

OBJECT_SCRIPT_TIME is an average over the past 30 minutes. When a script rezzes or restarts, the average is reset.

The wake-up period is also by far the slowest; many scripts will report well over 1ms before averaging to as low as 0.001ms or less. Even this script will consistently reach 0.5ms - 0.7ms when reset in a sim with a little bit of spare time, and quickly falls below 0.0005ms:

default { state_exit() { } }

The same script will average differently based on external factors. The laggier the sim, the higher the script times will be across the board. For all these reasons and more, it's just not smart to check for a visitor's script time as soon as they arrive. Most of the "lag" they're ever going to cause on the sim has already happened by the time their feet hit the ground.

  • Like 3
Link to comment
Share on other sites

11 hours ago, Wulfie Reanimator said:

For all these reasons and more, it's just not smart to check for a visitor's script time as soon as they arrive.

It wasn't upon arrival. It happened after several minutes.

Link to comment
Share on other sites

6 hours ago, WineOtter said:

It wasn't upon arrival. It happened after several minutes.

If 'several' is less than 30, the above arguments apply.

18 hours ago, Wulfie Reanimator said:

OBJECT_SCRIPT_TIME is an average over the past 30 minutes.

 

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 148 days.

Please take a moment to consider if this thread is worth bumping.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...