Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Laggy Calls

OmniCron Overlord
Registered User
Join date: 28 Nov 2005
Posts: 31
03-27-2006 10:16
I am trying to write lag friendly code. Is there a list or does someone know what causes lag the most while scripting. I would like to see kind of what to avoid and a ranking of what kills sims when scripinig.
Hunter Stern
Web Weaver
Join date: 7 Oct 2004
Posts: 377
03-27-2006 11:55
Sensors have ranked up pretty high imo next to listens. it's best to apply a listen remove as well as llSleep () and llTimer .

anyways those are some things to consider.
_____________________
OmniCron Overlord
Registered User
Join date: 28 Nov 2005
Posts: 31
03-27-2006 12:30
How much do sensors need to be used to cause lag? I am sure if your time interval is set to 0.1s then that is an issue. How about every 15 seconds? Also how much do listeners cause lag when not on open chat channel 0.
Sky Honey
Coder
Join date: 16 May 2005
Posts: 105
03-27-2006 14:31
Lag
_____________________
OmniCron Overlord
Registered User
Join date: 28 Nov 2005
Posts: 31
03-27-2006 14:55
Thank you for that reference. Read it thoroughly. I have a question about llVolumeDetect now. The article says that if you only need to detect things within 5m then use llVolumeDetect. How would this help? It seems to simply take a normal object, make it phantom while detecting collisions. How does this detect anything outside of itself being collided with as quoted below from the wiki?

"Keep your sensor range as small as it needs to be. If you only need to detect someone's presence within 5m, don't make your sensor radius 90m. (And if your sensor range is only 5m, consider using llVolumeDetect--not a sensor.)"
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
03-27-2006 15:10
Because you can rez a 10m invisible volume-detected cube/sphere, which lets you cover a 5m radius space with it.
OmniCron Overlord
Registered User
Join date: 28 Nov 2005
Posts: 31
03-27-2006 15:11
brilliant! Thank you.