Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Which lags less - llListen, XML/RPC, llGetNextEmail?

Wagahai Oddfellow
Registered User
Join date: 21 Aug 2005
Posts: 23
02-22-2006 21:23
I've been playing with various ideas on how to control scripts in SL.. but I'm curious which actually has the least lag...

... poll for an e-mail every 30 seconds
... XML/PRC
... Listen

I have some scripts that I need the ability to control, but I really don't care which of the methods I use, but I'd like to know I'm being as kind as possible to the sim. I've already read to see "Don't listen unless you have to - and if you have to listen, avoid channel 0", but nothing is really said about XML/RPC or using something like a 30 second timer for checking incoming mail.
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
02-23-2006 02:41
I've never actually tested, but I'd bet the answer is XMLRPC is the lowest - the sim doesn't do anything until it receives a appropirate message, then does it's thing.

The other two are frankly unquantifiiable I suspect. A timer running does hit the sim, but it seems that it waits for time X to come around almost passively, then fires so it's pretty minimal in that wait phase.

A listen, likewise, on an obscure channel, seems to wait for that right bit of data to come along pretty minimally, and then fire.
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
02-23-2006 03:31
I would expect email on a timer to be the least laggy myself - I don't know much about the XML-RPC implementation, but both that and the listen are constantly waiting for listen or remote_data events, and a timer surely must be less laggy than that.
Sky Honey
Coder
Join date: 16 May 2005
Posts: 105
02-23-2006 05:01
From: Ordinal Malaprop
I would expect email on a timer to be the least laggy myself - I don't know much about the XML-RPC implementation, but both that and the listen are constantly waiting for listen or remote_data events, and a timer surely must be less laggy than that.

I don't think XML-RPC works that way. There's a web server running on the sim machine waiting for HTTP requests from the outside world. When it gets an XML-RPC request it spins through the list of registered XML-RPC scripts and calls it if the keys match. So there's one "listener" for the sim (the web server), not one for each XML-RPC script.
_____________________
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
02-23-2006 05:13
Each script would have to be listening to that listener as well though. I'm sure that's more efficient than an actual listen (depending on how resource-intensive the sim XML-RPC server is, probably not bad at all) but I wouldn't think anything would be less laggy than a timer that was still counting down.
Sky Honey
Coder
Join date: 16 May 2005
Posts: 105
02-23-2006 05:26
In the wiki entry for llSensorRepeat it says that for PASSIVE scripts:
From: someone
the script is running, and awaiting an event, but isn't doing any monitoring (like llListen); no sim resources are being used.
I have a gadget I use to detect ACTIVE scripts, and XML-RPC scripts don't show up like timers and repeat sensors do, and neither do doors that open on touch. XML-RPC is like waiting for a touch event - the script is not consuming resources, it's waiting to be called.
_____________________
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
02-23-2006 05:38
It sounds like it's time for the bi-annual sim stats messuring.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Sky Honey
Coder
Join date: 16 May 2005
Posts: 105
02-23-2006 05:44
Wagahai, don't miss the interesting communication techniques in AlternativeCommunications.
_____________________
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
02-23-2006 06:23
From: sky Honey
In the wiki entry for llSensorRepeat it says that for PASSIVE scripts: I have a gadget I use to detect ACTIVE scripts, and XML-RPC scripts don't show up like timers and repeat sensors do, and neither do doors that open on touch. XML-RPC is like waiting for a touch event - the script is not consuming resources, it's waiting to be called.

Hmm. Interesting.

Tell you what, let's put a self-replicating XML-RPC receiver and a self-replicating timer in a few different sims and time them to see how long it takes for a crash.

not really, Jeska