This is the old site.


This is the old website. The new site is
http://www.fellowshipofthefourthage.com/
Watch for updates there. Bookmark the new site.

March 5, 2011

Reducing Personal Script Time -- Class Notes

by Belenos Stormchaser

We all like to look good and be able to do fun stuff on Second Life. 

Unfortunately we are often crippled by lag. 

Lag is caused by several things:

*  huge textures - textures should be 512x512 to keep loading time to a minimum
*  active scripts - both on both on your avatar and on the sim you are on
*  individual internet connection speed
*  quality of your videocard, processor speed and RAM - this means you can be lagged by avatars or sims with lots of glow, particle effects, water reflections and shadow and lighting.
*   view distance setting (the higher the laggier it might be)
*  Second Life having a bad day, week, month, year!

NOTE:  I have not included ARC, or Avatar Rendering Cost in this list. This is because ARC is no longer valid with modern Second Life technology and modern video cards. It may have been relevent six years or so ago when SL first began, but not today

This notecard will deal with what YOU can do to reduce your lag and lag on the sim you are on and therefore for those around you.  It will also give a brief summary of what sim owners can do to help reduce lag on their sim.

WHAT YOU CAN DO TO REDUCE LAG:

Your avatar - how can it cause lag?

1.  Sims are only allocated a certain amount of script time.  Homestead sims get 8.500 ms.  Full sims get 25.000 ms.  This script time has to handle every scripted item on the sim, from animated beds, waterfalls, doors that open and close, scripted vendors in markets, fun things like danceballs, rides, animals that move, etc etc.  It must also handle the scripts on your avatar.  Once the total script time of everything on the sim, including your avatar (and others) goes over the allocation for the sim, things start getting queued.  Pose balls will hesitate before they work.  Avatar scripts will hesitate before they work. When things get too bad and your script request is queued for too long, the server can forget it totally.  This is when you experience lag to the effect that nothing works.  

For example,  if you are on a homestead sim, with a script allowance of 8.500 ms and the sim has scripted items on it that take up 4.500ms then it only has 4.000ms free for visiting avatars.   If your script time is 1.500, you only leave it 3.500ms spare.  You are ONE avatar. But what if there is an event, and say, ten people are there with the same script time as you? 10 x 1.500ms = 15.000ms - nearly double the total allowance for the entire sim!    Therefore, it's important that we all learn how to reduce our personal script time.   Mine currently is 0.035ms.   If there were ten of me on a sim, it would be 10x 0.035ms = 0.350ms.  As you can see, this would greatly help the sim, AND your experience there.

If you are a dragon, be aware how much glow you have on as it can lag those around you who have weaker pcs.  Also, be aware of what particle special effects you use, as this too can challenge some machines. It may not lag you, but it might lag others.  So be balanced in our choices.

WHERE ARE THE LAG-CAUSING SCRIPTS ON MY AVATAR:

1.   Hair - resize scripts, colour change scripts.
2.   Jewelery - resize, texture, colour change, glow, shine scripts
3.   Clothing - resize scripts
4.   Shoes - especially shoes with feet - skin tone change, nail texture, colour change, even shoe colour change
5.   Scripted weapons.
6.   Radars, Sim scanners,  HUDS (dance, romance etc), Emdash, Mysti-tool and Secret Agent HUDS can be VERY high script time.
7.   Poorly scripted furry or dragon avatars (Seawolf dragons run at between 0.375ms and 0.547ms and this is with our animation HUD on. Kinzart usually run at between 1.100 and 1.400ms.  Others can be much higher.)

I have not listed Animation Over-riders as these are usually very light on script time (that's the only thing causing my script time at the moment.) Nor have I listed Titlers or Spellfire HUDS (for role play) as these again are very light on script time.

What you can do:

1.   Be aware that any new item you have purchased may be scripted.  Click on it and select 'edit' and check the 'contents' tab of the edit window. This will usually show you the scripts in the item.  The number of scripts does not always equal the level of script time it uses. ONE poorly written script can be much worse than several well written scripts.

2.   If your item is copy then make a copy and keep it in reserve if you can.  Then, set the item how you want it to be with colour, size etc.   When you are SURE you are happy with the item, if it has the option to delete the scripts in it (this usually shows on the popup menu) then delete them.   If it does not have this option, but the item is modify, then click on it, and then click on the tools tab on your viewer toolbar , and select 'set scripts to not running in selection'. This will save it as it is currently set but reduce the script time on it to zero.  If you ever wish to change the item, you simply have to reverse this step by clicking on it again and selecting 'edit' and then going to the tools tab again and selecting 'set scripts to running in selection'.  

The step of setting scripts to not running is much easier than trying to delete each script from each prim on the item.

3.   If your item is no mod and does not have the option to delete the scripts on the popup menu:  The best thing to do in this circumstance is to approach a sim owner for help.   Make SURE you are happy with your item setting - for example, if it is shoes with feet, be sure the skin tone is right and the nail colour is right etc.  Once the scripts have been disabled in this manner, it will be PERMANENT.  Once you are SURE you are happy with it, simply ask a sim owner (I am happy to do this for you at any time) to disable the scripts in your item.   To do this, rez your item. They will then need to go to their Region/Estate tools found under the 'world' tab of their viewer.  They then to go 'Get Top Scripts' and find your item.   They click on the name of your item in the list, and then click 'disable selected'.   MAKE SURE THEY DO NOT CLICK 'DISABLE ALL' as this will PERMANANTLY disable everything on the sim!

Most good product makers now include a 'delete scripts' option on their menus.  There are some older products on the market that do not, hence the need to either set the scripts to not running yourself, or ask a sim owner to disable them.

4.  Refrain from wearing Radars or HUDS that are really unnecessary.  Don't just load them on your avatar as a matter of habit.  It's ironic that it's often the folks with the highest script times that complain the most about lag!

It DOES take time to lower the script time on all the items you regularly wear, but the effect on the sims you visit and your personal experience of Second Life is well worth it.   I will be holding regular 'clinics' where folks can come and check their script time or ask me to disable any items they want disabled.   I am even happy to help them track down items that have scripts in them that don't appear to.

WHAT SIM OWNERS CAN DO TO REDUCE LAG:

Wise sim owners manage their sims carefully.  

1.  Limit the number of textures on it - eg. Arador only has two or three types of trees, so once the texture of one is loaded of that type, all load.  Your viewer isn't trying to get two dozen tree types to load.  This also applies to buildings.  Try to limit how many different textures are on your sim.   For example, while arador has just over 10000 prims on the sim, not all of those are on ground level. Some are in the market, and some are in sky islands. So when an avatar comes to the sim or market, they are not trying to load 10000 textures at once.  They are only trying to load what their viewer can see.    If a sim has all those 10000 prims on one level, then the viewer will be trying to load all 10000 textures at once.  Keeping texture size to a maximum of 512 x 512 helps also. The bigger the texture the slower they are to load.

2.   Be aware of the script time of items you put out on the sim.  Poseballs should never run higher than 0.004, for example.  What's the script time on your flower rezzer or butterfly rezzer? What about your scripted season change trees?  Or your huntable animals?  Or that cute gazebo with sits, fire, texure change, and danceball in it?  What about that lovely grass that emits thistledown or butterflies and has lovely nature sounds. Do the scripts have to be in EVERY piece of it?  OR will just one or two suffice?

Did you know that things that run particle effects, like fires, will still work once the scripts are removed?  This is true too of snow makers and rain makers, or fog emitters.   Did you know that texture animation scripts can be removed and the texture will stay animated?  

3.   Do you host a market on your sim?  Scripted vendors can all add up, especially ones that connect to a remote database.  One vendor may run at 0.040, but what if you have forty, or four hundred?  Every bit adds up.   On Arador I prefer the 'sell from the box' system. No scripts and nearly 2000 items for sale in my market with minimal lag. Even hovering text can all add up, not to mention it can look cluttered.

4.  Keep a friendly eye on the script time of visitors to your sim.  Most have no clue their personal script time is so high.  Sometimes it can be a simple cause as wearing a shoulder pet, which they can easily remove.  Hand them this notecard to help them understand how they can improve their personal script time. Most people are more than willing to do so.

5.  Reboot your sim at least once a week and especially before an event. This clears out residual script 'ghosts' and makes sure the sim is running as well as it can.

So BE AWARE.    Work to keep script time to a minimum on your sim, thereby keeping more time free to visiting avatars.   Despite hosting a huge market, and many residences, Arador currently runs at 6.872ms with no avatars in it. This keeps just over 13.000 ms spare for visiting and playful dragons and shoppers in the market.

If ANYONE needs help knowing and reducing their script time, please contact BelenosStormchaser Magic. I am MORE than happy to help with this.

(Please note:  Some say that turning off scripts or disabling them does not help as they still take up 'memory' on a sim.  At this point in time there IS no memory limit on sims and rather than the scripts take up script time AND memory, at least with them disabled, they are no longer taking up script time which definitely has a limit per sim.)

> "Reducing Personal Script Time" Class