Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llListen optimisation question

Pete Littlebird
Registered User
Join date: 30 Sep 2009
Posts: 44
10-20-2009 06:40
When creating a listener, is it better to use either a name or a key, or both, when the subject is a single avatar?

llListen (channel, owner_name, owner_key, "";);
//or
llListen (channel, "", owner_key, "";);
//or
llListen (channel, owner_name, NULL_KEY, "";);
//?

(Edit) It's occurred to me that using just a name could be subject to interference from similarly named objects, so it'd probably be best to avoid that option when possible.
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
10-20-2009 07:27
Yep - it's definitely better to filter as much as you can. Anything that tells the sim that it doesn't need to run your script is goodness, especially on frequently-used channels like 0 or even 1-10..

If you filter by llGetOwner(), make sure to watch for owner changed events and reset the script or redo the listen so you pick up the new owner. Also, if you filter by llGetOwner, you won't be able to hear objects owned by the the objects owner, which is a bit of a drag..
_____________________
Tired of shouting clubs and lucky chairs? Vote for llParcelSay!!!
- Go here: http://jira.secondlife.com/browse/SVC-1224
- If you see "if you were logged in.." on the left, click it and log in
- Click the "Vote for it" link on the left