Moleculor Satyr
Fireflies!
Join date: 5 Jan 2004
Posts: 2,650
|
08-29-2004 23:47
Ok. Just was curious... which puts more drain on a sim, calling timer, with a bunch of if() statements with code and a llParticleSystem, or rezzing an object with ParticleSystem already on it?
llParticleSystem makes a RedCone update (alt-shift-U to see them), as does rezzing an object.
Or is it about equal. Anyone with any thoughts?
_____________________
</sarcasm>
|
Samhain Broom
Registered User
Join date: 1 Aug 2004
Posts: 298
|
08-31-2004 11:28
In UNIX when I want to test the efficiency of a coding method, I will gang a bunch of the statements together and then put variable in front and back of the script that measures the duration. I suppose, that it would not be too horrible to do a test such as this and only run it for a few iterations as a test would it?
Could you do something similar with the llGetWallClock (forgive me this is NOT the number of seconds since midnight) into say...
integer start_time = llGetWallClock(); <specified number of iterations looped in a code> integer stop_time = llGetWallClock(); integer difference = stop_time - start_time; llsay(0, "Number of seconds " + (string) difference);
Then with the above code, change the loop in the middle to see which is faster. If you did that, and discovered that one method was faster than another, would that also mean that the faster one would create less lag?
By the way, I'm fairly new at LSL, but I am pretty good with a lot of other languages. So if this is a bad practice, then ignore it, but does it seem like it would make sense to you?
_____________________
rm -rf /bin/ladden #beware of geeks bearing grifts
|
Higbee Protagonist
Yggdrai Ranger
Join date: 7 Aug 2003
Posts: 266
|
09-01-2004 13:27
rather brilliant idea Samhain but this will not answer Mole's question. Time to process != amount of strain on server. The main reason for this is the client-side interface, which adds a huge variable to all of such questions.
It should be less strain on the server to do the latter of the 2 Mole. This is because the particle scripts have more down time from running. Yes there is more than one but operations executed by each are simpler. I would just put it in the on_rez() event and have a rezzor =)
_____________________
Higbee Protagonist ************************ "Even an immobile stone will respond to you If you approach with love, call out, and talk to it." - Shinagawa Tetsuzan
http://www.redprometheus.com
|