Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llMessageLinked SLOW ?

Dominique Laville
Registered User
Join date: 24 Apr 2008
Posts: 84
06-07-2008 08:44
Hello,

I have a root prisms and 10 children. I need to setText on two of the ten children.

So this is my code

...

//rez last 2 prisms
llRezObject("object", llGetPos() + <1.0, 1.0, 0>, ZERO_VECTOR, ZERO_ROTATION, FALSE );

llRezObject("extreme", llGetPos() + <2.0, 1.0, 0>, ZERO_VECTOR, ZERO_ROTATION, TRUE );

}



object_rez(key id) {
llCreateLink(id, TRUE);

// send text to the last 2 prisms
llMessageLinked(LINK_ALL_CHILDREN, 0, "prism1", prism1Text);
llMessageLinked(LINK_ALL_CHILDREN, 0, "prism2", prism2Text);

}

everything works. But it is SLOW! (3..4 seconds to display the text above the prisms..)

thanks

ps. Maybe the question should be shorter: "does the linking of 9 objects take around 5..6.. seconds ?
Deanna Trollop
BZ Enterprises
Join date: 30 Jan 2006
Posts: 671
06-07-2008 09:23
From: Dominique Laville
(3..4 seconds to display the text above the prisms..)
Please clarify: From what point until the text appears takes 3-4 seconds?


From: someone
does the linking of 9 objects take around 5..6.. seconds ?
Each call of llCreateLink delays the script for 1 second, so linking 9 objects should take 9 seconds (or, probably slightly more). Note that llRezObject also has a built-in delay, which is, according to : "...a period of time proportional to the mass of the object and the rezzed object's velocity"
ArchTx Edo
Mystic/Artist/Architect
Join date: 13 Feb 2005
Posts: 1,993
06-07-2008 09:38
FYI, they are called Prims not Prisms. :)
_____________________

VRchitecture Model Homes at http://slurl.com/secondlife/Shona/60/220/30
http://www.slexchange.com/modules.php?name=Marketplace&MerchantID=2240
http://shop.onrez.com/Archtx_Edo
Deanna Trollop
BZ Enterprises
Join date: 30 Jan 2006
Posts: 671
06-07-2008 09:44
But "prism" is a type of prim, so I gave her the benefit of the doubt and assumed that's what she literally meant. :p
Dominique Laville
Registered User
Join date: 24 Apr 2008
Posts: 84
06-07-2008 11:07
ok, first of all i'm a man and not a woman :) and you're right, "Prims" :)

so, my script rezzes 9 new spheres and deletes them for a certain number of time. I need this kind of interactive interface in which I have to "refresh" the spheres.

Was it maybe better to use llListen ? Don't tell me so.. i hope no...I've lost a lot of time to implement it using llMessageLinked!
Viktoria Dovgal
Join date: 29 Jul 2007
Posts: 3,593
06-07-2008 16:41
It really looks like the built-in function delays are what hurt you here, communications delays can happen but they don't normally run into seconds. You might consider rezzing a pre-built 9-prim object and touching those up as needed, instead of rezzing and linking 9 pieces at run time. You might also put some of the operations with longer delays into helper scripts so they can run asynchronously.
_____________________
Dominique Laville
Registered User
Join date: 24 Apr 2008
Posts: 84
06-07-2008 23:02
If I link the 9 spheres together, then how can I select each sphere individually ? Is it maybe better to use llSay - llListen in my case ?

So, in second life does each script in the same object run in parallel ? Can I still use MessageLinked, to communicate between scripts, right ?

And if I have an object and 2 possible states A, B. Can I share methods of state A in more scripts ? And the same for B ? In other words, can I use the same state names in more scripts ?
Zen Zeddmore
3dprinter Enthusiast
Join date: 31 Jul 2006
Posts: 604
06-08-2008 04:00
if you are using this as some sort of ar graph, and you want it to be faster can you instead of rezzzing and linking mearly set transparancy to 100% for the ones you don't want rezed/visible? This way the link numbers would always reffer to the same prim.

You would much rather use linkmessege rather than llSay and listens. (If speed is your main concern)
_____________________
A kilogram of programmable nanobots can lower the certainty of both death AND taxes.
Dominique Laville
Registered User
Join date: 24 Apr 2008
Posts: 84
06-08-2008 04:04
oh ok, I didn't think about it. I could make the sphere transparent and still use llMessageLinked... mhm thanks.

If you have any other suggestion to increase the speed, PLEASE let me know :)

(ya.. the main problem is the linking speed.. i have to wait 9 seconds, for 9 spheres..)
Zen Zeddmore
3dprinter Enthusiast
Join date: 31 Jul 2006
Posts: 604
06-08-2008 05:12
before any complex build, i reffer to
/111/1f/106305/1.html
the sticky regarding LAG.
It's chock full of way to drive your programs optimally(Better for you, better for your neighbors)
_____________________
A kilogram of programmable nanobots can lower the certainty of both death AND taxes.
Dominique Laville
Registered User
Join date: 24 Apr 2008
Posts: 84
06-08-2008 05:35
if I use llListen and llSay instead of llMessageLinked, do you think it is going to be slower ? (I don't have to wait 9 seconds for the children rezzing...)

i don't have enough time to test all the possibilities, and I have to take a decision soon...
Viktoria Dovgal
Join date: 29 Jul 2007
Posts: 3,593
06-08-2008 05:39
From: Dominique Laville
if I use llListen and llSay instead of llMessageLinked, do you think it is going to be slower ? (I don't have to wait 9 seconds for the children rezzing...)

Chat messages can make the whole sim run (a little bit) slower, because all scripts in the sim have to be offered them. llMessageLinked really is the most efficient way for an object to talk with itself.
_____________________
Zen Zeddmore
3dprinter Enthusiast
Join date: 31 Jul 2006
Posts: 604
06-08-2008 05:43
i think everything i've ever read aggrees that llMessegeLinked is faster by orders of magnitude than listens (especially when you're putting listens in dozens of objects)

remember, when setting transparency via scriptting it really can go to 100% (unless it's an attachment). That won't affect the visibility of the hover text though. You'll still have to send a null string to erase any extant text. Good luck with your prject what ever it is. Maybe when it's done you'll let us know?
_____________________
A kilogram of programmable nanobots can lower the certainty of both death AND taxes.