Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

EMail, Listen & Lag

Shifting Dreamscape
Always questioning ...
Join date: 12 Dec 2007
Posts: 266
08-04-2008 01:13
I have a general question about scripting efficiency and keeping lag to a minimum. Consider the following:

System: Regional Server Script and n Client Scripts disbursed through out the region.
Functionality: Server can request data from clients and tell them to do things, communication is via email

Question: What is the best way (causing least lag) for the clients to be able to respond fairly quickly to server requests?

a) Timer in the client having it check its email queue every 1 or 2 minutes
b) Clients listening on a channel (not 0) for a 'Poll' call (Server using llRegionSay) and then going to their mail queue

Thanks in advance!
Damanios Thetan
looking in
Join date: 6 Mar 2004
Posts: 992
08-04-2008 06:31
Maybe a stupid question, but if clients and server are in the same region, why use email at all?

Listeners + regionsay will always be a lot less performance intensive as sending an receiving individual emails to all objects.

If you're using objects dispersed over multiple regions, the question is not relevant anymore.
_____________________
Shifting Dreamscape
Always questioning ...
Join date: 12 Dec 2007
Posts: 266
08-04-2008 07:26
That in part begins to answer my question ... I think.

My understanding was that listens would cause quite a bit of Lag (from the Wiki) .. but there was no mention there of lag being produced by email. So my thinking was that using mail was less lag inducing. As well there could be an issue where I need to send more than 1024 bytes.

So if the answer is that email definitely produces more lag than listens/says ... well I see how to do the system then ...
Damanios Thetan
looking in
Join date: 6 Mar 2004
Posts: 992
08-04-2008 08:11
A good way to check if something is laggy, is by checking the script delay LL built in for the specific method.

LL but a delay of 20 seconds on LLEmail, which says a lot.
Although for email, this is also related so you can't use SL as an email spam center.

Although LL could have optimized it for 'internal' mail nowadays. Email generally first leaves the sim, goes to the email processing servers, comes back, if it's internally, and is queued for the sim, which polls it and sends it to the correct script.

All in all, this is a larger strain on the network as a llRegionSay/Listen combo which never leaves the server in the first place.
_____________________
Shifting Dreamscape
Always questioning ...
Join date: 12 Dec 2007
Posts: 266
08-04-2008 08:26
Damanios,

Of course understand that from a network perspective and would not want to crash LL's systems with tons of email ;-)

But from a pure position of the server the sim is running on, and the lag that users would experience, does using email cause the server itself to process more that, lets say 50 listens running in the server? Each email is a one off function call, and getting the mail in the queue is the same, whereas having a listen running is something running the whole time. Which gets me back to my original question ... would using 50 timers, set lets say to go off every two minutes cause more lag than having 50 listens.

If the answer is that the listens cause less lag than the timers + email .. then I would likely drop the email system for communication in-sim and just keep my datastreams below 1024b.
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
08-04-2008 11:00
Remember though that in order to CHECK for e-mail, each of those 50 scripts must gain some execution time on a frequent basis, whether or not there IS e-mail to read. For a listen, on the other hand, you can allow the sim to run until there is actually an appropriate message; a much more event-based approach. That combined with the fact that you can't multiplex e-mail currently (there are no object-based e-mail lists ;-) ) would lead ME to suspect that listens will be less costly.