Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Multiple llListens VS monolitic

CrystalShard Foo
1+1=10
Join date: 6 Feb 2004
Posts: 682
09-30-2004 01:29
Here's a question:

Suppose that I need to run a script that listens to multiple selected people out of a large crowd (say, 20+ specific people out of 40). Which design of the following will cause the worse Sim impact?

A global llListen(0,"","","";); with an IF statement checking for keys on listen events, or a master script with several optimized child-scripts, each running their own llListen(0,"",key,"";); filter that listens only to that specific person?

Remember that the crowd is chatty and thus there's expected to be alot of listen() event triggers. I am trying to find the best way to minimize the impact for the event duration.

My theory regarding the second part is that if I can close the listeners whenever the need to listen to specific people ends, then the sim impact can grow bigger or smaller depending on the need - where a monolithinc global listen would continue to trigger on every little sentence...

... or could it be that running a whole bunch of silent llListen filters on separate scripts is worse?

Whats your take on it?
Hiro Pendragon
bye bye f0rums!
Join date: 22 Jan 2004
Posts: 5,905
09-30-2004 01:42
Can you filter on a non-0 channel instead?
_____________________
Hiro Pendragon
------------------
http://www.involve3d.com - Involve - Metaverse / Emerging Media Studio

Visit my SL blog: http://secondtense.blogspot.com
Moleculor Satyr
Fireflies!
Join date: 5 Jan 2004
Posts: 2,650
09-30-2004 02:58
From: someone
Originally posted by Hiro Pendragon
Can you filter on a non-0 channel instead?


I don't think that changes the impact in any way. A listen impacts a sim, regardless of people talking or not, whatever channel they're on.

That said, the monolithic approach would be FAR more server friendly.
_____________________
</sarcasm>
Alondria LeFay
Registered User
Join date: 2 May 2003
Posts: 725
09-30-2004 05:37
A single listen with perhaps a llListFindList call probably would be better than a giant 20 deep if/else bit.
CrystalShard Foo
1+1=10
Join date: 6 Feb 2004
Posts: 682
09-30-2004 05:50
I am infact allready using llListFindList in the monolitic llListen - but I am pondering if using a bunch of llListens with a filter in their field is any more efficent then a single llListen that is completly open on channel zero.

Hiro, ofcourse I could, but that does not answer the question:
Which is more impacting on a Sim, in the specific event of having to listen to only several specific people out of an entire room filled with chatting people: A single unfiltered Listen with a scripted selection inside the event itself, or several independed llListens with the filter on their command parameter?
Alondria LeFay
Registered User
Join date: 2 May 2003
Posts: 725
09-30-2004 05:57
It has been found that a single listen with the logic performed manually in the listen event is more efficient.
Samhain Broom
Registered User
Join date: 1 Aug 2004
Posts: 298
09-30-2004 08:53
I don't know what kind of an impact it would be to the users themselves, but I'm thinking about a similar need for this type of thing. I'm planning to do the monolitic approach, but will use a random non-zero channel for the people to interface on. That will not change the amount of llListen lag, but internal to the script, the "if then" code will have less to filter out. Since many text operations seem to also slow down a script, sorry I have no imperical or statistical measurements for this, I think this will be at least marginally better.
_____________________
rm -rf /bin/ladden #beware of geeks bearing grifts
Hiro Pendragon
bye bye f0rums!
Join date: 22 Jan 2004
Posts: 5,905
10-01-2004 01:08
From: someone
Originally posted by Moleculor Satyr
I don't think that changes the impact in any way. A listen impacts a sim, regardless of people talking or not, whatever channel they're on.

Well, for that matter, any script "impacts" a sim. It's a matter of how much. A listen with a filter affects a sim less than one without a filter.
_____________________
Hiro Pendragon
------------------
http://www.involve3d.com - Involve - Metaverse / Emerging Media Studio

Visit my SL blog: http://secondtense.blogspot.com
Moleculor Satyr
Fireflies!
Join date: 5 Jan 2004
Posts: 2,650
10-01-2004 01:20
From: someone
Originally posted by Hiro Pendragon
Well, for that matter, any script "impacts" a sim. It's a matter of how much. A listen with a filter affects a sim less than one without a filter.


However, two listens with filters impact a sim more than one without a filter.
_____________________
</sarcasm>