|
Shadow Subagja
Registered User
Join date: 29 Apr 2007
Posts: 354
|
07-25-2007 13:48
Just thought I'd verbal diahhrea some of the things I'm wresting with in a few scripts I'm working on. Perhaps one of you will have a suggestion that helps performance  1. limited parameters on object rez. -on object rez I often need to pass more info than just an integer parameter to the new object. Having to script a listener, use chat, and message the object asyncronously on object rez seems very heavyweight for something as simple as passing it a string or vector one time? Not to mention somewhat slow. 2. Translating rotations to angles. Be careful with this, it appears to give an absolute value when using llAngleBetween. After writing a bunch of code to extract angles and transform around using llEuler2Rot(easier to keep my head wrapped around it) I had to back up and find a way to stay within rotations because of this. Better performance, but now its not very obvious what the code does. At least that appeared to be the case (I was scripting an object sensing compass and the neele was always pointing in quadrants 1 or 4). 3. Sending large amounts of data object to object. I am currently looking at ways to send very long strings between 2 objects. Right now llRegionSay on a semi-private channel appears to be the only valid way. I am fearing that this is going to be very slow, and if I have to encrypt.. possibly dog slow. Anybody with pearls of wisdom is welcome to throw out random thought bubbles! Cheers, SS
|
|
Senuka Harbinger
A-Life, one bit at a time
Join date: 24 Oct 2005
Posts: 491
|
07-25-2007 14:11
From: Shadow Subagja 1. limited parameters on object rez.
-on object rez I often need to pass more info than just an integer parameter to the new object. Having to script a listener, use chat, and message the object asyncronously on object rez seems very heavyweight for something as simple as passing it a string or vector one time? Not to mention somewhat slow.
I pass vectors as an integer. for example: <100,43,76> would get passed as 100043076. in the case of the x value being less than 3 digets, the recieving code checks the length of the integer and calculates it from there.
_____________________
My SLExchange shopTypos are forgiven; desecrating the english language with reckless abandon and necrophilic acts is not. The function is working perfectly fine. It's just not working the way you wanted it to work.
|
|
Shadow Subagja
Registered User
Join date: 29 Apr 2007
Posts: 354
|
07-25-2007 14:48
Thats something I was thinking about, I was scared about the potential for float,float,float but you are right that for a large percentage of vectors an assumption of 3 digits or less could be made.
Do you find that chat/link message performance varies much if you pass a null string/id and an encoded integer, versus passing a data string for the same purpose?
|
|
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
|
07-26-2007 14:19
_____________________
I'm back......
|