Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Highest Demand Scripts

Chaz Longstaff
Registered User
Join date: 11 Oct 2006
Posts: 685
07-01-2007 13:20
My estate manager ran a report, in which a texture organizer I purchased topped the list by far.

It came in at .095 (The next nearest item was my dog at .058, and if she goes, I go, grin.)

Below that everything else in sim seems to rank at .011 and lower.

Anyhoo, I sent the maker of the texture organizer this msg: "My estate manager was investigating lag, and sent me the attached screencap. It seems to say that my texture organizer is the prime offender. How can this be when it's just sitting idle?"

The maker replied: "It does have a few scripts in it and quite a bit of scripting. The scripts are not active. If your estate manager is a lag hag better off renting somewhere else as any sort of complex script will show as high. Also, on a list my script would be the most complex .095 is not laggy. Just there is not many scripts with high usage in that area."

I realize that scripts can be active if they have lots of lllisten(), etc in them (though mind you this organizer takes only touch commands, no voice.)

But, and here's what I really wanted to ask:

I've heard (and perhaps it's not worth anything more than that) that these kind of estate reports can be wildly -- um, useless. That rather than actually measuring the activity of scripts and therefore impact of scripts, they can just count the number of scripts in an object, even if the scripts aren't not doing anything. If that is true, then it could possibly be that the texture organizer tops the list just because it has a good number of scripts in it?? ... a rough count shows about 112 scripts in it.

Opinions anyone?

Apologies if this has been discussed before. I searched for answers before posting (but the search engine in these forums ain't exactly Library of Congress grade, lol.)
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
07-01-2007 15:49
yikes, 112 !?!?!, but anyways it doesnt matter if they are active or not, if they are running they are taking up sim cpu power and memory,

if they are running they are using

now i wonder what kind of crap this thing is doing to have 112 scripts in it ... you could almost make (an old copy of) photoshop in that amount of space :)
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
07-01-2007 18:59
I'd guess that most of the scripts are just memory for tags supplied by the user for all the textures in the organizer. Unless something is very wrong, those shouldn't be consuming much CPU beyond the tiny amount used by every idle-but-running script. If it were one of the popular texture "catalogs" it might be busy in background, communicating with a server feeding it new texture UUIDs and prices (or whatever). But if it's just sitting there holding textures (and scripts) in Inventory, it's hard to see how even that many scripts could consume much CPU.

[Edit: Maybe, just maybe, this texture organizer has some "offline backup" feature whereby it regularly sends all its memory off to a webserver for safekeeping? That would burn some CPU, even when the device wasn't in use.]

It would indeed be helpful to have more info about the accuracy of the Estate report.
Darien Caldwell
Registered User
Join date: 12 Oct 2006
Posts: 3,127
07-02-2007 12:57
As an Estate Owner, I can tell you the numbers can be misleading. The report will only show a 'snapshot' of what the scripts were doing at that time. The script time can vary widely. Honestly, .095 is average, I often see items coming up .3, .5 and yes sometimes even 1.0 or more. It depends on what they are doing. You have to keep in mind these numbers are milliseconds. .095 millisecond is a very tiny amount of time. What matters is how many scripts and what it all adds up to. when you start getting into the 7-8 ms of total script time, things start gettting slightly sluggish.

The main problem is, this report does *not* show scripted attachments, many of which are probably the *actual* biggest offenders. I wish LL gave Estate Owners the ability to see attachment script times.
_____________________
Max Duesenburg
Registered User
Join date: 13 Sep 2006
Posts: 33
09-19-2007 16:05
As an estate manager...

Yes, the numbers are misleading if taken as an absolute value - they make more sense if compared to the figures for a known script taken at the same time.

As to 0.095 being average, sadly this is probably true for a lot of sims. However, the vast majority of scripts can and should be passive. (Actually a lot could and should be set to not running but that's another matter). A passive script (like the default scripts) will generally take 0.001 to 0.003 depending on the class of sim. This can easily double depending on the current sim load.

Scripts in attachments do not show up as stated, until the avatar sits on something. At that point if you look at the script time used for the object being sat upon it will report the total script load for both the object and the avatar's attachments.

Max
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
09-19-2007 17:05
I do definitely wonder why a texture organizer has 112 scripts in it...WOW...

...as for 0.095 being "average"...I'm not sure what the average is, but I know that if I make a script that tops 0.010, I get angry with myself. My web-enabled network vendors work at 0.006 and my web-enabled rental boxes run at 0.003...both are "complex" scripts. The most complex scripted-item I make (a role-play system) runs at 0.030 with 30 scripts in it.

...as far as the estate-tools being 'reliable'...I would say that they're only reliable if you take an "average" over time. When I'm testing a script that I make, I'll run the snapshot over and over again (refreshing the single object constantly) for a good 5-10 minutes and ensure that I capture any sort of "processing loops" it may go through within that time. Additionally, anytime I check for 'lag-scripts' in a sim...I'll check the sim for a couple of days and refresh the snapshot several times/check before I say "this script is reliably above my preferred 0.050 mark".

...Now, again, people here are right in saying that we're talking about a portion of a millisecond...and attachments are generally the biggest offenders. Not only that, but please do remember that prims and textures are generally more "offensive" than scripts lag-wise!
_____________________
--AeonVox--

Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms chasing ghosts, eating magic pills, and listening to repetitive, addictive, electronic music.
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
09-19-2007 17:46
Can't really think of a reason for an organizer to have 115 scripts, unless....... Do you have a 10 x 10 organizer? Might have a script in each texture button. But if you have one of them and have 512 x 512 textures then the sim is going to take one hell of a lot bigger hit in image time then script time whenever you change the page.

Hit ctrl alt d and expand it to get to time (ms) and expand that. Watch that when you change pages or use different functions with the organizer and let us know what you come up with.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
09-20-2007 09:39
As Darien said, the script times in the Region tools are snapshots, not averages. It is very hard to discern real, over-time impact of any particular object in the sim without doing rapid, averaged snapshots (refreshes) and, even then, you may be seeing a burst of activity in an otherwise idle object.

Also as said, 0.095 ms isn't bad at all for a complex scripted object. Most vendors idle at around 0.050, but are at 0.150+ when in use.

As for why a texture picker has 112 scripts in it, it could be anything from sloppy/outdated scripting techniques ("I must have a script in every prim for touch and object appearance changes!";) to having a very complex set of capabilities which necessitate it. Most often, it tends toward the former, though.
Tiarnalalon Sismondi
Registered User
Join date: 1 Jun 2006
Posts: 402
09-20-2007 10:15
In regards to attachments, you will notice that you can get a script time from them if the avatar is seated. Since they become a part of the linkset of that prim, that prim will report the total script time for the AV's attachments.

When I used to have estate management rights I would monitor this kind of thing since the actual owners didn't really understand the tools, and I would often see a simple "office chair" reporting a 4.0 (sometimes even higher), and when I would track the seat down with the beacon, it would have somebody with a ton of armor and crazy jetpack stuff sitting in it. I just kind of passed those by until I saw someone that had hardly anything on them and they were hitting like a 3.2....I kindly asked them what in the world could be causing that.

I've also seen that vehicles seem to generate the most lag of 'normal' objects. This is why you see areas that state no vehicles allowed, though sometimes that is due to space issues or what have you.

I never got the chance to test around and see what a truely wide range would have, but sitting idle I'd see most register 0.05+ Some very poorly made non-physicals would be happily idling at 0.8. These same vehicles would then jump to 1.0 and 2.2+ respectively when being flown/driven.

Worst single item by far I've seen was a simple little frog that spiked at 32...don't ask me how, but the sim almost died. I didn't even track it and just clicked return :)

So I would really not consider 0.095 bad at all, though for a texture box I would wonder what that could be all about, but as said above, it really depends on the complexity of it...with 112 scripts I hope it has a massive library.
Darien Caldwell
Registered User
Join date: 12 Oct 2006
Posts: 3,127
09-20-2007 12:45
From: Tiarnalalon Sismondi
In regards to attachments, you will notice that you can get a script time from them if the avatar is seated. Since they become a part of the linkset of that prim, that prim will report the total script time for the AV's attachments.


Ahhh! that explains what i've seen on a few occasions. Good to know. :)
_____________________
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
09-20-2007 13:34
The whole seated-avatar thing is interesting to hear...especially since I've rarely--if ever--seen a seated avatar that takes up less than 3.2 script-time. Since it was such a regular number that I'd seen, I had largely assumed a high-cost of animation. Perhaps instead it's a function of all the radars and multi-tools that people seem to religiously wear (I have yet to wear one or find use for one in 2.5 years in SL)...
_____________________
--AeonVox--

Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms chasing ghosts, eating magic pills, and listening to repetitive, addictive, electronic music.