Most often then not lag is blamed on scripts. And very often you see people implement restrictions on scripts that can be used on sims, events, fairs, etc.
What is with this? Are scripts to blame for most of the lag or is it just that people tend to be scared of and blame that what they do not understand?
Fact is that most people don’t really understand lag, even those that spend a lot of time checking the top scripts on a sim. I mean, who did read the manual? Who spend time reading the Wiki? Who after reading everything fully understands it?
Short answer is barley anyone. Which results in people assume that scripts with more memory cause more lag then scripts with less memory. This however is a complete falls assumption.
I can write you a single extremely small script that will cause 100 time more lag then a properly made product that contains over 20 scripts and at least 80x more memory.
To put things in perspective what memory is concerned a script on average is 64kb and one single texture on average is 768kb. Or in other words, one single texture takes about the same memory as 12 scripts.
Okay sure, reducing script would reduce lag. But then again, rezzing 1 less tree on a sim would probably have the same result as removing 50 scripts.
Sure scripts can cause lag, but by looking at the memory a script uses you are none the wiser. A relevant stat however would be stream cost which unfortunately the Top script window in SL doesn’t show. This is one of the reasons i created the Lag Scanner PRO HUD (which lets you scan for stream cost).
Apart from textures causing more lag then script, one single avatar can cause more lag then 200 scripts. While most scripts have a screaming cost of less then 0.5, the average avatar has a streaming cost of about 100. And the more “laggy scripts” usually have a streaming cost of about 3.
But, yes, you don’t want to start blaming or ejecting avatars. Especially if you have a commercial sim. Even do they are probably the ones to blame for most of the lag.
Anyways there are many ways to reduce lag. Real ways to reduce lag. And they mostly do don’t start with scripts.