Which scripts cause lag?
|
Regan Turas
Token Main
Join date: 21 Oct 2006
Posts: 274
|
03-08-2007 10:17
A few months ago I bought land (over 8k) in a bascially empty sim. It was wonderfully lag-free, with gently rolling grass land that was a pleasure to behold.
Gradually, over the course of weeks, the land was bought up and most recently two casinos have moved in. Now the landscape is cluttered and the sim is constantly lagging; my packet loss goes through the roof. It would be quite easy to blame the casinos, but I dont' know enough about the dark underside of SL scripting to make that judgment on any proof other than the continued complaints of residents on this forum who blame casinos for sim abuse.
The thing is, over this same time period I've been decorating my land and quite a few items that I've installed have scripts. Scripts for lights, for torches, for my bat rezzer and two bird rezzers (all from Svarga), a water fountain, a few swimming ducks and a turtle, a guard goose, a radio, and music piped in to at least half of the property.
Oh yeah, and the landmark giver for my small storefront, along with an AV height detector. And god only knows what else that I can't even remember.
Am I the sim abuser? How can I tell? I don't know enough about scripting to know which scripts could be a problem, assuming I could even review the code. And most scripts are not viewable since they belong to no modify items I've purchased.
Is there any way to identify the source of sim lag or the presence of scripts that are poorly written, or even whether one land owner (like me) is just hogging too many sim resources?
|
Annabelle Vandeverre
Heading back to Real Life
Join date: 30 Nov 2006
Posts: 609
|
03-08-2007 10:43
I'm no scripting whiz either but here's what I've learned: If the script is modable, turn off the script using the checkbox. See if the item still works. Flames and fountains work without the script turned on so they can be turned off or even removed from the item with no ill effects. What baffles me is that pretty much everyone I see who makes these things leaves the scripts running. Well, except me, now that I know better. If you're in a mainland sim like me, you can see how many scripts are running in the sim, but not who's running them or if they're resource hogs. Island owners have better tools for detecting these things.
_____________________
I am returning to my real life for personal reasons this summer. My store, $50 or less @ Annabelle's Garden and Home Decor, is now closed. Thank you to my customers for making my store successful in the short time I've been here. Get this before the bots do: http://slurl.com/secondlife/Nefrax/153/156/40
|
Markubis Brentano
Hi...YAH!!
Join date: 15 Apr 2006
Posts: 836
|
03-08-2007 10:50
From: Regan Turas A few months ago I bought land (over 8k) in a bascially empty sim. It was wonderfully lag-free, with gently rolling grass land that was a pleasure to behold.
Gradually, over the course of weeks, the land was bought up and most recently two casinos have moved in. Now the landscape is cluttered and the sim is constantly lagging; my packet loss goes through the roof. It would be quite easy to blame the casinos, but I dont' know enough about the dark underside of SL scripting to make that judgment on any proof other than the continued complaints of residents on this forum who blame casinos for sim abuse.
The thing is, over this same time period I've been decorating my land and quite a few items that I've installed have scripts. Scripts for lights, for torches, for my bat rezzer and two bird rezzers (all from Svarga), a water fountain, a few swimming ducks and a turtle, a guard goose, a radio, and music piped in to at least half of the property.
Oh yeah, and the landmark giver for my small storefront, along with an AV height detector. And god only knows what else that I can't even remember.
Am I the sim abuser? How can I tell? I don't know enough about scripting to know which scripts could be a problem, assuming I could even review the code. And most scripts are not viewable since they belong to no modify items I've purchased.
Is there any way to identify the source of sim lag or the presence of scripts that are poorly written, or even whether one land owner (like me) is just hogging too many sim resources? Theres a drop down called beacons and you can turn on "script" beacons. This will show you visibly where all of the scripts are. (The beacons are crosshairs and intersect at the script generator itself, so you will most likely see a lot of vertical red lines on your screen) When you get closer to the actual script, you will see a little box. There is another way to actually test a script to see how inefficient it is but I couldn't tell you where to find it....I only know its out there. Even still....I'm not sure if you could test the scripts on someone elses property with that tool.
|
Regan Turas
Token Main
Join date: 21 Oct 2006
Posts: 274
|
03-08-2007 11:00
From: Markubis Brentano Theres a drop down called beacons and you can turn on "script" beacons. This will show you visibly where all of the scripts are. I've used that view mode before to hunt for lost items (like my SL Vendor box, which went missing for a few days). But the information is basically useless without a yardstick of what it means. How many scripts are too many? Or is the number of scripts of less importance than the type of script or the code practices used? I'd never realized that scripts could be stopped or removed without changing function. I'm still trying to wrap my mind around that one, but it will be fun to play with that. But only a very few of my items have scripts that I can reach, so again, that isn't a great deal of help in figuring out the effect of all the other stuff I have running. I'm less concerned about other people's scripts -- since I have no control over those -- but would really like to rule out any problems I'm causing. Without the tools to measure, I have no way to judge. For all I know, I'm bringing down the whole sim.
|
Markubis Brentano
Hi...YAH!!
Join date: 15 Apr 2006
Posts: 836
|
03-08-2007 11:06
Here you go /54/8e/145210/1.htmlThis may or may not help you, but it is a plethora of information.
|
Prospero Frobozz
Astronerd
Join date: 10 Feb 2006
Posts: 164
|
03-08-2007 11:12
From: Regan Turas I'd never realized that scripts could be stopped or removed without changing function. I'm still trying to wrap my mind around that one, but it will be fun to play with that. But only a very few of my items have scripts that I can reach, so again, that isn't a great deal of help in figuring out the effect of all the other stuff I have running. Unless the scripts are horribly written or doing other things besides turning on the particles, removing the script will make basically no difference to sim performance. Particles aren't actively scripted. All a script has to do is call a single function to turn the particle emitter on. After that, they emit. The script thereafter basically doesn't do anything, and as such is using basically no server resources. It's not a big deal to have a script that just turns something on and then sits there. Lots of things do that. The scripts that turn on particles, the scripts that set floating text over an object, etc. All of those are scripts, but while they are technically "running," they aren't getting an appreciable amount of the machine's attention, and so aren't a problem. -Rob
_____________________
--- Prospero Frobozz (http://slprofiles.com/slprofiles.asp?id=6307) aka Rob Knop (http://www.pobox.com/~rknop)
|
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
|
03-08-2007 11:47
That's very true but people shouldn't confuse what Prospero said with "particle/settext scripts don't cause lag." Changing the particle settings or setting the text causes a full object update. A bunch of objects setting these things once is no big deal. A bunch of objects frequently changing these things can be a different story.
|
grumble Loudon
A Little bit a lion
Join date: 30 Nov 2005
Posts: 612
|
03-08-2007 11:54
The biggest problem with Sim lag is the memory leak in the SIM code due to downloading images. As more agents download the images the slower the sim gets. Just monitor the "images time" under the ctrl-shift-1 (condense "basic"  open "Simulator"->"Time"->"Images time". Scripts generally are slowed down as needed to maintain the sim's FPS.
|
Regan Turas
Token Main
Join date: 21 Oct 2006
Posts: 274
|
03-08-2007 12:59
From: Markubis Brentano This may or may not help you, but it is a plethora of information. Thanks! This will take a bit of study, but even a brief scan showed that this has some really useful information on the impact of scripts. I'm relieved to note that AV scripts are a big performance hit, and that's one area in which my conscience is clear. I don't even run a simple HUD, although that's on my list of SL basics to master someday (the default female makes me wince).
|
Annabelle Vandeverre
Heading back to Real Life
Join date: 30 Nov 2006
Posts: 609
|
03-08-2007 13:08
From: Prospero Frobozz Unless the scripts are horribly written or doing other things besides turning on the particles, removing the script will make basically no difference to sim performance.
Is this no longer true, then? Thread: "dormant" scripts aren't as dormant as you think /54/8f/105133/1.htmlEither way, I see no point in keeping a script running after it has served its purpose. Why tempt lag?
_____________________
I am returning to my real life for personal reasons this summer. My store, $50 or less @ Annabelle's Garden and Home Decor, is now closed. Thank you to my customers for making my store successful in the short time I've been here. Get this before the bots do: http://slurl.com/secondlife/Nefrax/153/156/40
|