Don't click here unless you want to be banned.

LSL Wiki : Lag

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are


What is lag, and how can it be reduced? In networking parlance, "lag" (also called "ping" or latency) refers to the delay incurred when sending data from one server to another over a network. In SL, it's commonly used to describe any slowdown experienced, be it low framerate, a delay in movement, or a sim running slowly.

What is server-side lag? | What is client-side lag?
Reducing server-side lag | Reducing client-side lag


Each simulator within SL runs on its own independent CPU. This means that badly written, inefficient scripts can affect other residents in a sim. Lag is not just limited to physical objects, either. Things like listeners and sensors can do more than one might realize. There's often a more efficient--and frequently simpler--way to implement things.

These functions can help monitor a sim's "health":


There are various client-related things that are central to lag: texture and geometry changes must be transmitted from the server to the client, and this information can add up. SL requires a lot of bandwidth as it is. Frequent texture and audio changes can result in a queue for the client that just keeps growing and growing if the client can't download it fast enough.

Once downloaded, the amount of data can slow down the client if the computer it's running on doesn't have a lot of system or video RAM. Low video RAM can also result in textures being dropped, leading to blurry or missing textures on objects and avatars. Rendering speeds can also be affected by having to draw avatars or large numbers of prims, particularly when textured with alpha textures, can also impact rendering speeds, especially on slower computers.

(It is confusing to technical people to call any slowdown at all lag--technically, the "tardiness" of network data, which happens with long distances, busy servers, and having much too little bandwidth) because in SL it will regularly mean it applies only to the reporting person whose settings are taxing their computer.)

So how does one fix slowdown? As someone who is experiencing (rendering) lag, there are two options: either upgrade the computer or tweak your preferences. For the latter, play around with lowering the details in the preferences window (Ctrl+P), or even turn off less necessary rendering via the debug (enable using Ctrl+Alt+D) menu. The preferences are often enough: dropping the draw distance ("Adv. Graphics" tab, and ensure "Disable Far Clip" in the "Graphics" tab is not checked) can help tremendously. "Local Lighting" is also another lag inducer, particularly since SL 1.7, so disabling that can help too.

To make sure one's created objects aren't causing extra rendering lag, avoiding lots of polygons and textures is a good idea, but most people have computers that can keep up these days. It's server-side lag that we can really do something about.

Q: What about llSetTextureAnim? Someone told me to take it down because it was generating lag. Isn't it supposed to be client-side?
A: This person did not know what they were talking about. Unless you are constantly calling llSetTextureAnim from your script, texture animations cause only a single object update. llSetTextureAnim does not affect sim load. It causes only very minor client load. However, it should be noted, animated textures tend to be big which can cause increased loading times and can lower your framerate because more texture data needs to be swapped in and out of texture memory when changing your view.

Lag Reduction Tips: Server-Side

Lag Reduction Tips: Client-Side

Style Guide | Simulator | Server | Client
There are 10 comments on this page. [Display comments/form]