Jump to content

llShout has a forced delay, and llRegionSay doesn't? (Or at least not as much?)


Sara Nova
 Share

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

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

Recommended Posts

So according to the wiki, llShout doesn't have a forced delay. However, in practice it seems to. Strange thing is, llRegionSay doesn't.

When I run this script, this is the output I get:

[00:09:26] Object: 0.020564
[00:09:35] Object: 8.756221
[00:09:36] Object: 0.555780

Now the first output is the time it takes to iterate through a list of 500 values when it just gets each value from the list (as a string) and does nothing with it. The second time it also llShouts the value on a negative channel. The third time it llRegionSays it on the same channel. I think it's strange that llShout would have a forced delay when it's not supposed to, and that llRegionSay either doesn't have a forced delay or has a much smaller one.

What do you think about this?

Link to comment
Share on other sites

llShout() put more load on the server than llRegionSay() does
With llShout() the server must compute what targets are within 100m in order to exclude all others
With llRegionSay() the targets are all objects and avatars in the region

llWhisper() and llSay() are slower too but llShout is the slowest

:smileysurprised::):smileyvery-happy:

Link to comment
Share on other sites

According to your test one llShout needs 0.0175 sec. Problems with that speed?

According to my tests the region server buffers about 1500 messages b4 it starts dropping. (may vary of course)
And a listen event in a script receives up to 15 messages per second - thats max and thats alot slower than the speed you can shout messages. A listener can process all 1500 messages in the region buffer which takes some minutes. The scripts event queue you have to keep in mind for other events doesnt have an effect for listeners it seems.

So the limits are pretty high for chat communication.

To save resources better use llRegionSayTo or llRegionSay. :)

Link to comment
Share on other sites

Under what circumstances did you conduct the test?

I take the point everyone's making -- and I agree with it -- that llShout takes up a lot more of the sim's resources than does llRegionSay but I find it hard to believe that that, on its own, would explain why it apparently took 8.756 seconds to run through a list of 500 items, or that it should normally take 7.5 seconds longer to llShout the list than to llRegionSay it. 

I'm just wondering what else was happening on the sim at the time, and if you might not have got different results if you'd tried the test several times in in several different places.   I don't know, but I think it might be worth looking into.

Link to comment
Share on other sites

A side question here.

Is llRegionSay affected by parcel privacy?

I saw no mention of this in the Wiki.

I have an object that uses llRegionSay that works perfectly in SIMs with no Parcel Privacy set, but is failing in SIMs where it is set.

 

 

Link to comment
Share on other sites

My opinion is just you have met some huge  lag when your script was running the loop for the shout .

For instance , some avatars who have TPed in the sim .

Or your used channel has been spammed by other scripts ( probably your owns )

 

 

llShout doesn t take more time than the others messages functions ( well .. in truth , yes but not with a time spent of 8 seconds )

IllShout has not a forced delay ..

 

When you want to measure , loop your tests several times to verify your doubts and hypothesis .

Store the results of time in lists and use llListStatistics

 

To add , you could use the llGetEnv(frame_number) in parallel to count the frames ran by the simulator . So , in comparing time spent measured in frames , and time spent measured in seconds , you could know if you have met some lag while your tests

 

integer count = 500; list GenerateList(){    list temp = [];    integer i; for (i=0; i<count; i++) {        temp += [i];    }    return temp;}list stats_listtostring;list stats_llShout; list stats_llRegionSay;list stats_frames_listtostring;list stats_frames_llShout; list stats_frames_llRegionSay;default{     touch_end(integer total_number)    {        integer i;        list l = GenerateList();        integer numberTests;        integer maxNumberTests = 100;        llOwnerSay("Running");        float startFrame = (float)llGetEnv("frame_number");        float refFrame = (float)llGetEnv("frame_number");        float refFrame2 = (float)llGetEnv("frame_number");        do        {            llResetTime();            refFrame = (float)llGetEnv("frame_number");            for (i=0; i<count; i++) {                llList2String(l, i);            }            stats_listtostring += llGetAndResetTime();            refFrame2 = (float)llGetEnv("frame_number");            stats_frames_listtostring += (refFrame2 - refFrame);            refFrame = (float)llGetEnv("frame_number");            for (i=0; i<count; i++) {                llShout(-384853, llList2String(l, i));            }            stats_llShout +=  llGetAndResetTime();            refFrame2 = (float)llGetEnv("frame_number");            stats_frames_llShout += (refFrame2 - refFrame);            refFrame = (float)llGetEnv("frame_number");                                    for (i=0; i<count; i++) {                llRegionSay(-384853, llList2String(l, i));            }            stats_llRegionSay  +=  llGetAndResetTime();            refFrame2 = (float)llGetEnv("frame_number");            stats_frames_llRegionSay += (refFrame2 - refFrame);                                    llSetLinkPrimitiveParamsFast( LINK_THIS, [PRIM_TEXT,            (string)(100.0*numberTests/(float)maxNumberTests) + " % done",<1,1,1>, 1            ]);        } while ( ++numberTests < maxNumberTests  );        float endFrame = (float)llGetEnv("frame_number");        llSetText("",<1,1,1>,1.0);                float totalTime =         llListStatistics(LIST_STAT_SUM, stats_listtostring )        + llListStatistics(LIST_STAT_SUM, stats_llShout )        + llListStatistics(LIST_STAT_SUM, stats_llRegionSay );        float totalFrames =        llListStatistics(LIST_STAT_SUM, stats_frames_listtostring )        + llListStatistics(LIST_STAT_SUM, stats_frames_llShout )        + llListStatistics(LIST_STAT_SUM, stats_frames_llRegionSay );                        llOwnerSay(llList2CSV([ "total running Frames", (endFrame - startFrame) / 45.0 ,"\n",                                "time spent in loops" , totalTime, "\n",                                "frames spent in loops" , totalFrames/45.0, "\n",                                "dilatation time during the loops",  totalFrames / ( 45.0 * totalTime) ]));                                         llOwnerSay("Min stats_listtostring " +(string)llListStatistics(LIST_STAT_MIN, stats_listtostring ));        llOwnerSay("Min stats_llShout " +(string)llListStatistics(LIST_STAT_MIN, stats_llShout ));        llOwnerSay("Min stats_llRegionSay " +(string)llListStatistics(LIST_STAT_MIN, stats_llRegionSay ));        llOwnerSay("Max stats_listtostring " +(string)llListStatistics(LIST_STAT_MAX, stats_listtostring ));        llOwnerSay("Max stats_llShout " +(string)llListStatistics(LIST_STAT_MAX, stats_llShout ));        llOwnerSay("Max stats_llRegionSay " +(string)llListStatistics(LIST_STAT_MAX, stats_llRegionSay ));         llOwnerSay("Mean stats_listtostring " +(string)llListStatistics(LIST_STAT_MEAN, stats_listtostring ));        llOwnerSay("Mean stats_llShout " +(string)llListStatistics(LIST_STAT_MEAN, stats_llShout ));        llOwnerSay("Mean stats_llRegionSay " +(string)llListStatistics(LIST_STAT_MEAN, stats_llRegionSay ));        llOwnerSay("Median stats_listtostring " +(string)llListStatistics(LIST_STAT_MEDIAN, stats_listtostring ));        llOwnerSay("Median stats_llShout " +(string)llListStatistics(LIST_STAT_MEDIAN, stats_llShout ));        llOwnerSay("Median stats_llRegionSay " +(string)llListStatistics(LIST_STAT_MEDIAN, stats_llRegionSay ));                                              }}

 

Result :

Object: total running Frames, 98.644447,
, time spent in loops, 98.536987,
, frames spent in loops, 98.288887,

dilatation time during the loops, 0.997482

Object: Min stats_listtostring 0.021235
Object: Min stats_llShout 0.176874
Object: Min stats_llRegionSay 0.399096


Object: Max stats_listtostring 0.110616
Object: Max stats_llShout 0.711185
Object: Max stats_llRegionSay 0.663242


Object: Mean stats_listtostring 0.053231
Object: Mean stats_llShout 0.458603
Object: Mean stats_llRegionSay 0.473536


Object: Median stats_listtostring 0.045074
Object: Median stats_llShout 0.467005
Object: Median stats_llRegionSay 0.466646

 

As you can observe it , llShout is seamless with llRegionSay

Done over 100 loops of 500 calls  in a sim with few lag ( time dilatation = 0.997482)

 

Note : the speed of llShout , llSay , llWhisper and llregionSay are essentialy dependants of the length of the message .

In you test , you send only a number betwen 1 and 500 , so a message with a length of 3 characters .

I have redone a test with a more "realistic" message with a length of 400 charcters .

total running Frames, 475.644440,
, time spent in loops, 475.405334,
, frames spent in loops, 474.600006,
, dilatation time during the loops, 0.998306
exemple tests stats: Min stats_listtostring 0.020166
exemple tests stats: Min stats_llShout 0.689046
exemple tests stats: Min stats_llRegionSay 2.512136
exemple tests stats: Max stats_listtostring 0.133063
exemple tests stats: Max stats_llShout 3.422645
exemple tests stats: Max stats_llRegionSay 3.377404
exemple tests stats: Mean stats_listtostring 0.043291
exemple tests stats: Mean stats_llShout 1.915376
exemple tests stats: Mean stats_llRegionSay 2.795386
exemple tests stats: Median stats_listtostring 0.044351
exemple tests stats: Median stats_llShout 1.947074
exemple tests stats: Median stats_llRegionSay 2.777997

As you can observe it  :

- llregionsay takes more time than llshout . But it s again seamless .

- llshout and llregionsay takes between 5 and 8  X more than in your test .

So the length of the message is the most important .

 

Link to comment
Share on other sites

I checked this numbers a not-so-long while ago and llShout was significantly slower. Same behaviour is stated in the wiki.

I checked now and there is no big difference. Tested llRegionSayTo too - is same as llRegionSay. So indeed it doesnt matter what you use at the moment. All chat messages have about the same speed. Things changed.

A receivers listen event processed about 10-12 messages per second but 25-30 when receiving over 3 channels at the same time. The sim buffered over 1200 but less than 1500 messages b4 it started to ignore new messages.

(only quick test, no statistical base here. Numbers may vary on sim type / message length / channels / whatever)

Link to comment
Share on other sites

The real limit/cap is 45 per second  . .. because a script can t trigger twice the same event in the same frame .

And a sim can get only 45 frames per seconds .

 

Probably for the listen event , the limit is the half of 45 , so 22 events max per seconds. 

By experience , it was 22 events per seconds , my own cap . I don t know exactly why the half and not the full .

Anyway , it will be difficult to process the message within 1/45 seconds

 

Nevertheless , it s very dependant about what is your code inside the listen event .

If you take more time or use some functions with delays , your rate will be lower .

I guess than in your quick test , you have stored the messages , or their times , in a list or a string .

Your first test with only one channel was dealing with a list of 1500 elements . So it has been slowed down by your process time

Your second test with three channels was dealing with 3 lists of 500 elements . So it was faster

 

I

Link to comment
Share on other sites

I used a listen event with NO processing time besides increasing a counter. No lists, no storing, just checking for the "stop" message to get a time :)

So thats easily capable of handling the max of 45 events per second. The sim is obviously throtteling the messages by triggering about every 3rd/4th frame.

The version with 3 channels used if .. else if ... constuct to increase 3 counters depending on incoming channel. Leads to the assumtion that the throtteling is by channel and by script.

I'll try 3 receiver scripts and see what each of them gets.

Update:

Got around 15 receives per second when receiving 400 messages. Is the number per script. With 3 receiver scripts each one gets 15. If each of the 3 scripts receives 1200 messages over 3 channels each script receives by 18 per second.
The sim got tired after a few rounds and numbers decreased by 20 % - hehehe.

Ok, I dont care for the details since that may change with next server version. If people TP in and out numbers change alot too. But the performance limit is on the receiver side. The speed of the sender is meaningless because its multiple times higher than the receiver.

Link to comment
Share on other sites

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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...