Jump to content

Execution Efficency


Wandering Soulstar
 Share

You are about to reply to a thread that has been inactive for 1971 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hi All,

Have a question to see if anyone knows or has looked into the following to see what is more efficient. Scenario is that I am going to be setting the LinkParams of a number of prims (5-10). Would it be better to make all the calls with one single llSetLinkPrimitiveParamsFast using multiple PRIM_TARGET to do in a single call, or do a loop calling llSetLinkPrimitiveParamsFast once for each prim?

Link to comment
Share on other sites

My question to you is: Do these prims HAVE to change appearance at the same time?

Scripts on SL can be interrupted (or rather ignored) during any given "frame" of processing time. If you have multiple calls, other scripts might (and they will) be prioritized over yours, leaving only the first few prims with new appearances until the rest of the script gets to run. If you only have one call, even though it can be delayed, it will affect all prims at the same time.

Personally, if my intent was "simultaneous change," I would use one big call. I think there is no significant difference in memory usage, and the code can be neatly formatted on multiple lines. One call might be faster as well, but I have no proof.

Edited by Wulfie Reanimator
Link to comment
Share on other sites

Like Wulfie, I have to evidence to suggest that one method is more efficient than the other.  My default choice is to put all related SLPP commands into a single statement, but only because it's more efficient for me personally.  I can see the flow of execution more clearly in my own mind when I can write more compact code.  But that may just be me.

  • Like 1
Link to comment
Share on other sites

from a code efficiency pov, where execution time is the meaning of efficiency, then as Rolig mentions less API calls is more efficient than more API calls

from a added effects pov then is as KT mentions. The meaning of efficiency changes. What is the most efficient way to ,make multiple API calls to create the desired effect 

Link to comment
Share on other sites

People tend not to operate their blinds all that often. You're never going to generate much system load that way.

Script load comes from stuff that's running on a timer at a high rate when the object is not being used by an avatar. It's important to turn off your timers when they are not needed. Or at least slow them way down. Vehicles should turn off when parked. Active stuff should turn off until triggered by a collision or an infrequent sensor poll. Breedables, farming, etc - timers should fire maybe once a minute or two when no one is interacting with them.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1971 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...