PostHeaderIcon Attention Second Life Creators: Stop Causing Lag!

GeminiSecond Life is a wonderful virtual place to be. For those of us enthusiasts, it has to do with the content and lack of rules. Okay, allow me to qualify this statement: by 'lack of rules' I am not speaking of morality or anything like that. I am referring to what is commonly referred to as "code law" - what the computer code allows us to do.

In the case of Second Life, there is a lot of code-law, but I am referring to the lack of 'goals' and 'quests' and all that stuff. In other words: no levels to "level-up" to. Which brings us back to content.

Except for the virtual land we run around on, everything on the grid is user-created (yes, technically even the Linden builds). That means we start with a clean slate, a blank canvass and start creating as we choose. And because of this the variety of creative 'builds' is stunning, fascinating, and impossible to see all of it.

However, the down side to this also has to do with the way all content is created as we choose. You could, in simplistic terms refer to the Second Life grid as a three-dimensional web page. Okay, each sim could be a page, group of sims be a web site and so on. This is a good thing. This is a bad thing.



The point being that the 'web page' is built by it's creator and that creator may not really be all that adept at optimizing that web page for the best user experience: finding what you want, fast download time, good-looking and interesting and so on.

Yes, just like the world-wide web, everything resides on the servers which serve the content, meaning you must download everything you see to your computer before you can see it. Most of us can certainly remember the early days before broadband, just groaning in agony as a painfully slow (and often sloppy-looking) web page downloaded. Many were so bad that some people turned image-rendering off - just to speed-up the download and get to the text copy content.

Those painfully slow-loading web pages could be referred to as having "lag". Sometimes it was your computer - not powerful enough to run those Flash animations. Sometimes it was your connection: a 28,800 baud modem when you really needed a 56K. And sometimes it was the server: so many "hits" that it struggled to serve the content 'down the pipe' to you.

It's the same thing with Second Life.

Unlike other MMO's where the majority of content (like America Online for example) is already on your computer - installed by the CD or downloaded installer application, Second Life pre-installs: nothing.

Everything you see in your viewer has to be sent to you from the grid: the Second Life servers. So in this there is lag from three basic sources (and there is a built-in lag meter in the viewer which actually attempts to indicate which of these sources is the cause of any lag you are experiencing.)

  1. The first and most often cause of 'lag' will likely be your computer hardware. This isn't your fault. Even if you have a Bugatti-based PC or Mac (always wanted a Bugatti! ); it is the creators that are killing your experience. You computer must process all that information and then draw what you see - preferably 30 times every second. Of course you could be placing a strain on your system if you crank-up the graphic preferences like I do - draw distance=512; maximum quality on objects and avatars and water and sky and all that.If you experience a lot of lag, I would suggest you experiment by turning your graphic settings down a lot - and only keep the "Avatar" setting to mif or high. You'll be amazed at how much "lag" is cut-down.

    There is a reason the default settings in the Linden Lab viewers are 'medium'. This is what will provide a relatively acceptable experience for most. The problem is when creators over-crowd their sims or parcels or retail shops with too many prims - all in view at once. There are some sims that that require a good ten to fifteen minutes just to rez to an acceptable level. (Creators, see the Gwyneth Llewelyn link at the end of this post to learn how you can optimize your parcels.)

  2. Bandwidth. Even with crappy service like I have, broadband is still broadband and will work quite respectably and fast. But it doesn't mean you should create your product art (pictures to show the stuff you sell in vendors and boxes for example) at 1024x768. That's just plain stupid. It takes forever to rez. And when landing in a poorly designed mall were there are 500 individual and separate textures to download... That poor server and your bandwidth are struggling like crazy. Keep a fire extinguisher nearby.Even though texture-rezzing isn't really lag, it causes lag because it slows the server down - it plugs your bandwidth - it slows everything down. Your viewer and the server must remain in constant contact. The server must also track your position 'on the ground' - but at the same time, it also must throw all this data down the pipe so your computer can draw the pictures for you...30-times a second. And the same for everyone else around you.

    This is why you try to walk before being fully rezzed after landing somewhere and when you stop walking... you keep moving. Then, when the server finally catches-up to you - you 'spring' back to where you stopped walking. If the delay is too lang, the server will disconnect you entirely. This is where that wonderful message pops-up asking if you want to quit, or stay and review IMs and the like.

    So all you creators: optimize your textures. Most if not all decorative textures have no need to be larger than 256x256 and most will do quite well with as little a resolution a 32x32. Sheesh. Stop force-feeding all of us with bloated garbage.

  3. Then there is sim lag. This is where the sim struggles to keep things going. Unlike the above with your bandwidth being plugged-up with sloppy, over-sized textures, and your viewer struggling to build prims too many prim shapes all at once and then apply those bloated textures to them - in a three-dimensional perspective on-top of it all, this is where the server itself must struggle to manage all the information about you and also keep track of you, and also decipher what you're doing by interpreting the scripts you use: animation overrides, radar and other HUDs, the scripted swords and guns on your back or hips and so on. Oh, and also decipher your prim attachments, and their constantly-changing position in 3-D space as your AO changes your pose.


Now, take all of the above into account. This is why you must suffer the 'landing' period after every teleport. On a good sim that is optimized you might be fully rezzed and ready to go in a minute or two. Hell, even on a sim that is not optimized it might take only a couple minutes before everything is ready to go.

Bus Driver Face -----> :{Oh and for the record, one way to know you yourself are over-scripted with too many HUD and attachment scripts: how long it takes to cross from one sim into another. really. Try it: remove all your HUDs and scripted attachments - all of them. Then cross a sim border from one sim into the other. Average time I have personally experienced: 2 to 3-seconds.

Then, return to the same place on the previous sim - put all those HUDs, AOs and other scripted attachments on again and repeat the same process in the same direction. You will be astonished at the difference in time it takes to cross that border. All because of the scripts you carry on your 'person'.

Now, imagine 39 other people on the sim - most within draw distance of you (you can see them when they rez) - think of what the server is doing. Everything I described above is now happening 40 times (once for each person) and then again another 1,560 times as everyone else must be drawn for everyone else.

That means their position, their animations, their scripts (HUD and attachments,) their textures, their prim attachments...

This is one of the reasons I hate bots with a purple passion. If you are abot-herder - please, please, please: strip them to nothing - no attachments, no HUDs, no nothing - hell naked, even would be good. Botfarms often have 'bots' that are decked-out, all 'prettied-up' and some on pose stands with some stupid dancing animation going. Yay.

Unfortunately among all those textures and prim attachments, only a handful are really optimized for the grid - or internet in general. Sloppy builds in both attachments as well as the rezzed environment (not in visual quality, but for example: more prims than necessary,) Sloppy scripting (mono might be faster and better managed than LSL - but if it's sloppy scripting, it doesn't matter, does it?)

There also are many 'wives tales' about what might cause lag or where it's coming from. For instance: the "Avatar Rendering Cost" might cause some lag for anyone within visual sight of someone wearing 5000 prims (exaggeration, obviously) - but only some of that lag is happening at the server, the majority is at your computer as that is where all that stuff is drawn. Again, a good creator still will optimize as much as possible to have some mercy on everyone else that must see that thing (some "Ripper Boots" for males and jewelry for females come to mind immediately.) Oh and as irritating as "bling" often is - it doesn't cause lag. That's handled at your computer. Though I suppose it could be blamed for inducing a few seizures.

As for scripts - I am personally sick and tired of collars (like the "Open Collar" that sits running script cycles parsing every thing said in open chat waiting for "dskneel" or something. Is it the collar wearer's fault for not turning this off and changing it to a silent channel (which also makes it so the wearer doesn't look and sound like amateurs to-boot?)

Or is it the creator's fault for setting it up this way as the default?

Skills Hack wrote a damned good blog post about avatar-caused lag. It should be required reading for all creators of avatar attachments, including HUDs:
Nowadays the biggest lag problem is mono-scripted attachments during teleports. Most of the people don't realize that every prim of their shoes contains one or more scripts. Resizers in clothing and hair etc made by creators who are afraid of making their items MOD. You don't need your insane hug&kiss yiff combat HUD 3000 in INSILICO, thanks but no thx. No need for radar HUDs, use Emerald instead. Attach those things when you really need them, that's common sense.

You are bogging down Sims to a halt all over SL on every TP. Of course you don't notice but everyone else in the sims does. And no, I don't blame you but lame creators who don't know how to script efficiently. The end-users don't even have a way to measure the lag they produce (yet). LL is working on parcel based performance monitoring and thanks to Moy Loon, one of the next Emerald releases will include a feature that - if you enable it - notifies you of total script jumps in the sim, kinda like this:

[13:46] Melodee Moonites has left the sim.
[13:46] Total scripts jumped from 7700 to 7200(-500)


[From Laggy Avatars - INSILICO]

Further reading of Skills' post also will tell you her sim (Insilico) will monitor your script usage and even warn you. Well, hell, Skills... find a way to package that tool up and sell it to sim and other parcel owners. I'll buy one in the blink of an eye!

As for other myths about lag and what causes it and what doesn't, the article by Gwyneth Llewelyn should be required reading by anyone and everyone on the entire grid, no matter if you are resident number one.

For example, one of the myths of lag:
Scripts will only run when nothing else is to be done — this means they run at the lowest possible priority, and the more scripts in the sim, the slower they will run — without affecting texture download or avatar movement whatsoever.

...So, turning off your AO, entering “sleep mode” on MystiTool, or detaching everything with a script in it will make no difference at all. Granted, if everybody is wearing a thousand scripted attachments, they will notice that their attachments work very, very slowly, or possibly not at all. But they’re not lagging the sim.

Go read the entire article - it's a long, highly instructive read.

art: Ari Blackthorne; Sheah Odriscoll
blog comments powered by Disqus