Jump to content
Sign in to follow this  
Lureo

Confused about script number and complexity

Recommended Posts

I have been ejected because I had too many scripts. But I don't know how to know how many scripts I have. And if I know the number i don't know how to reduce this number.

Is a number of script a good metrics ? you have very small script that sleeps. And hube script thar runs all the times.

 

What is complexity? Is it the number of line in a script ? I notice that sometimes I have a little window that show me my complexity but the number is that this information disapeared after few seconds. How to make this imformation displayed longer. How to know my complexity. What is complexity? How to reduce my complexity or make it more complexe.

Share this post


Link to post
Share on other sites

There are several different kinds of script "complexity" each of which matters to region performance depending on what's most in demand in the sim at the time.

Script count is in fact a more useful measure than one might expect. For one thing, it's easy to understand and easy to reduce, as well as having its own particular validity, separate from other measures. To measure it, there are (easy) scripts that can get it precisely, but I don't think viewers report it directly; rather (in the Linden viewer) "Me" / "My Scripts..." will give you a per-attachment memory size, and for simplicity you can just assume that each script accounts for 64 kb of the memory reported there. The easiest way to reduce it is to remove the attachments with the largest numbers and if necessary replace them with more efficient versions. For items that can have their scripts removed, make sure you're wearing a copy you won't need to adjust, then get rid of any resizers, texture-changers, and anything else you can get rid of either by menu or, for Modifiable items, manually.

Many attachments, especially HUDs, you may find you don't need at all. Lose them, aggressively. One prime candidate: HUDs for adjusting your mesh avatar or head. (Heads are often harder, though, because many only animate at all if the HUD is attached -- not a design for minimum script impact.) One thing that can be extremely helpful is the "Quick Preferences" folder in Catznip where you can keep all the often-used HUDs just one click away for on-demand attachment. Firestorm has something similar though not quite as handy.

Note that script count is itself a problem, even for scripts that do nothing at all, and even if memory is no issue. That's because scripts are run by a special scheduler that itself uses more time the more scripts there are in the sim, whether or not those scripts actually need to run. Also, for busy regions, very substantial processing happens when loading up all the attached scripts when an avatar arrives (and some when it leaves), regardless of whether those scripts do anything once they're loaded. You can tell when new, heavily scripted avatars arrive just by watching sim statistics -- and it's not pretty.

Script memory used to be a major concern because that used to be a real bottleneck. Less so now under anything like normal usage.

Script time is usually the most important way avatar-attached scripts can lag each other. This can be measured by other scripts. It's a very confusing measurement, though, and takes a long time to settle into a practical measure after arrival in a new region. So region monitors tend not to report this measure to visitors, it's just too hard to interpret. Responsible scripters, though, will always try to minimize script time for all products especially including attachments.

(Incidentally "Avatar complexity" has nothing to do with scripts at all, instead measuring rendering complexity, and even then it's almost exclusively the effect of mesh geometry as opposed to texture load. It's a pretty lame measure, even for geometry, and is currently being studied in "Project ARCTAN" for improvement.)

  • Like 3

Share this post


Link to post
Share on other sites
3 hours ago, Qie Niangao said:

You can tell when new, heavily scripted avatars arrive just by watching sim statistics -- and it's not pretty.

This is the main reason why it feels like walking through peanut butter when you try to walk a few steps in a popular sales event. It is also the reason why your have to request a redelivery of your freshly made purchase there.

SL would be a significantly better place if people would be more sensible about their script count.

Rendering complexity is easier to solve. If you have a slower computer, simply limit the max complexity in your Prefs. More complex people will appear as blobs, but at least you'll keep a decent frame rate.

  • Like 1

Share this post


Link to post
Share on other sites

To be more practical for you: I you have too many scripts, start by removing any HUDs you don't need there and then and see if that does the trick.

If not, go home (or to your log-on point) and see if you can remove any scripts from your clothing etc. Right click > Edit > Content. Do you really need a resize script for your boots after you've made them fit? Some creators have that option in the HUD too.

Get something like this and check before you go out: https://marketplace.secondlife.com/p/KTC-Script-memory-meter/2973346

Lastly, save different outfits according to script levels. I'm obviously very low on a driving track and much higher on a nude beach. Because, well… attachments.

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...