Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Lag question involving timers

Krazzora Zaftig
Do you have my marbles?
Join date: 20 Aug 2005
Posts: 649
12-14-2006 09:15
I'm currently working in a sim where we have alot of scripts that may be running in the near future (combat area using *CS systems). Of course we have tons of players running scripts, doors, guns, security systems, etc. I am trying to reduce the ammount of lag items produce that the staff makes and an intersting question came up trying to make a light script.

In using llGetSunDirection() to set off a llSetPrimitiveParams for lighting we are trying to balance out the length of time the light is on (want it as close to the one hour mark as possible and if not then over) and any possible lag the timer used would create. Problem is I am not very good with scripts so was not aware if a timer did cause lag. I was under the assumption it was not the timer but the function (like avatar dection) that caused the lag.
_____________________
Lee Ponzu
What Would Steve Do?
Join date: 28 Jun 2006
Posts: 1,770
What's the question?
12-14-2006 11:03
So far as I can see, you didn't ask anything.
Joannah Cramer
Registered User
Join date: 12 Apr 2006
Posts: 1,539
12-14-2006 11:11
From: Krazzora Zaftig
I was under the assumption it was not the timer but the function (like avatar dection) that caused the lag.

These things are related, in a way. Triggering the timer event itself does involve some small amount of work for the sim, so the more often it happens, the more time is spent on handling that. The bulk of load though comes from the actual operations invoked on each timer() event. (this includes both instructions in timer() event itself, and any additional functions you call) So also, the more frequent the timer the more time is spent on processing these instructions.
Krazzora Zaftig
Do you have my marbles?
Join date: 20 Aug 2005
Posts: 649
12-14-2006 11:15
ok so the actual even is more of hte issue. So setting a timer to say ever 3 - 5 minutes to check position of sun won't be to bad then.
_____________________