These forums are CLOSED. Please visit the new forums HERE
Link Messages, Does It Make a Difference? |
|
Zuzi Martinez
goth dachshund
![]() Join date: 4 Sep 2004
Posts: 1,860
|
10-31-2004 23:16
when you're using link messages and you want to send it to just one prim, does it matter for speed if you send it right to that specific link number instead of using something like LINK_ALL_CHILDREN or LINK_SET? i dunno how it works behind the scenes.
|
Xero Zaius
Registered User
Join date: 4 Jan 2004
Posts: 17
|
10-31-2004 23:19
Doesn't really have any effect on the speed, but it mainly has to do with who gets the message. If you are sending a message that only one prim understands there is no signifigance in the number or LINK_SET, plus it saves you having to figure out the prim's number
![]() You only need to give specific numbers out if a message would interfere with something, like if you have a hovercraft and all the engines respond to Integer 5 for start and you only want the rear-left one to start. Let me know if I said that in a awkwardly complex way... i tend to do that.. lol. |
Zuzi Martinez
goth dachshund
![]() Join date: 4 Sep 2004
Posts: 1,860
|
10-31-2004 23:27
nah that was clear but i was wondering if there was a difference in how much work the server has to do. like if i have a 100 prim object and i want to send a link message from the parent to one prim (those are the only ones with scripts) and i send it to LINK_ALL_CHILDREN. will the other 98 prims have to stop and look at the link message and see if it applies to them or will the server ignore them since they don't have scripts?
i want to put as little load on the server as possible while doing as little extra work myself as possible. ![]() |
Xero Zaius
Registered User
Join date: 4 Jan 2004
Posts: 17
|
10-31-2004 23:38
I would send it to everything, just to be easier on yourself. As far as server load, its really not that much. Where there starts to be big server load is when people set up a ton of sensors (which is really stupid when volume detect prims would work better in most cases) or do the land barren thing of putting monster sensor objects around.
So; go with sending the message to everything, it will be easier on you and won't cause server performance tanking. |
Azelda Garcia
Azelda Garcia
Join date: 3 Nov 2003
Posts: 819
|
11-01-2004 02:26
Obviously if you have a farm of 60+ scripts in one of your prims to, oh I dunno, change prim alpha or something (non-realistic example, for illustration only), then you wouldnt want to be sending unnecessary link messages into that prim, otherwise it probably doesnt matter too much.
Azelda Edit: I didnt notice your second post. I dunno. If in doubt why not put llGetLinkNumber() instead of LINK_SET? _____________________
|
Ace Cassidy
Resident Bohemian
![]() Join date: 5 Apr 2004
Posts: 1,228
|
11-01-2004 04:12
So; go with sending the message to everything, it will be easier on you and won't cause server performance tanking. No, No, No!!! Sending a link message to every prim via LINK_SET, and not to a specific link number aboslutely DOES impact sim performance, and should be avoided when not necessary. When you send to LINK_SET, an event gets queued up to every prim in the object that has a link_message event handler, including the sender. And every one of these event handlers is not only going to get triggered, which is a non-trivial amount of overhead in and of itself, but its going to have to execute some amount of code just to determine that its a link message that its not interested in. Think about it for a moment. Say for example, your object consists of a dozen prims. If you do it the lazy why, then you're adding 12x the overhead to the sim, with most of that processing being done to determine that nothing needs to be done. My advice... Be a good citizen and do it the right way. - Ace _____________________
"Free your mind, and your ass will follow" - George Clinton
|
Apotheus Silverman
I write code.
![]() Join date: 17 Nov 2003
Posts: 416
|
11-01-2004 08:40
Sending a link message to every prim via LINK_SET, and not to a specific link number aboslutely DOES impact sim performance, and should be avoided when not necessary. Thank you for raising the voice of reason. Yes, sending linkmessages to all prims in an object multiplies the amount of work the server has to do by the number of prims. If you don't know the link number number to send to, sometimes it can be handy to send to LINK_SET, however this should only be done under very specific circumstances. _____________________
Apotheus Silverman
Shop SL on the web - SLExchange.com Visit Abbotts Aerodrome for gobs of flying fun. |
MSo Lambert
Registered User
Join date: 16 Aug 2004
Posts: 101
|
11-01-2004 08:53
I like to use the llGetLinkNumber function and let the root object know what link number it has to send specific messages to, so the childs can be relinked in any order... just my 2c.
_____________________
MSo
|
Ace Cassidy
Resident Bohemian
![]() Join date: 5 Apr 2004
Posts: 1,228
|
11-01-2004 08:56
By strategically naming your child prims, you can use llGetLinkName() to determine the link number of each prim in the link set.
- Ace _____________________
"Free your mind, and your ass will follow" - George Clinton
|
Moleculor Satyr
Fireflies!
![]() Join date: 5 Jan 2004
Posts: 2,650
|
11-01-2004 09:09
By strategically naming your child prims, you can use llGetLinkName() to determine the link number of each prim in the link set. - Ace You can name child prims, and it actually matters? Huh. Learn something new every day. |
Samhain Broom
Registered User
![]() Join date: 1 Aug 2004
Posts: 298
|
11-01-2004 09:36
yes, and the reason it matters, what the intent of naming them for the "discovery mode" mode is, you can get each one to llWhisper it's integer number, and when you do, you will see that "Prim name whatever" says: "Hi I am number " +(string)integer_prim_numberID
Then you will see the text on your screen. Write that down, and you have your number you need. That way, you can use the message link to talk to all children prims one time, then revise it so that when you want to talk to a specific one you just use that call to that one prim. _____________________
rm -rf /bin/ladden #beware of geeks bearing grifts
|
Lit Noir
Arrant Knave
Join date: 3 Jan 2004
Posts: 260
|
11-01-2004 10:19
Oh great, now I feel guilty and have to rescript my hot tub. Thanks Ace.
Out of curiosity, while I can see that there is an overhead impact of prims receiving link messages that don't concern them, is there any impact to sending messages to non-scripted prims or non-LinkMessage prims. Say the root prim with a script and one child prim with LinkMessage handler, and all the other prims either unscripted or without LinkMessage events. Just curious about how LSL would handle this. |
Zuzi Martinez
goth dachshund
![]() Join date: 4 Sep 2004
Posts: 1,860
|
11-01-2004 10:23
great tips, thanks for the response.
When you send to LINK_SET, an event gets queued up to every prim in the object that has a link_message event handler so if only one prim has a link_message event handler it doesn't matter if you have 100 other prims linked to it, it won't hurt performance to blast the link message to the whole linkset? only if they have link_message event handlers? that was my real question. nice the things you learn trying to get to your real answer though. ![]() |
MSo Lambert
Registered User
Join date: 16 Aug 2004
Posts: 101
|
11-01-2004 11:08
AFAIK, prims that don't have scripts or don't handle link_message event, should't affect sims performance if they receive link messages.
_____________________
MSo
|