Wandering Soulstar Posted November 27, 2018 Share Posted November 27, 2018 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 More sharing options...
Wulfie Reanimator Posted November 27, 2018 Share Posted November 27, 2018 (edited) 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 November 27, 2018 by Wulfie Reanimator Link to comment Share on other sites More sharing options...
Wandering Soulstar Posted November 27, 2018 Author Share Posted November 27, 2018 @Wulfie Reanimator They do no have to change at the same instant, this is for window blinds, which can either be controlled individually or have the whole room change via one initial call. Was looking at it simply from a point of view of code efficiency. Link to comment Share on other sites More sharing options...
Rolig Loon Posted November 27, 2018 Share Posted November 27, 2018 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. 1 Link to comment Share on other sites More sharing options...
KT Kingsley Posted November 27, 2018 Share Posted November 27, 2018 However... for the sake of theatre it might be worth having the blinds change sequentially, either in a logical sequence around the room or randomly. Seriously, if you can add drama to the mundane you are enhancing people's experience of SL. 1 1 Link to comment Share on other sites More sharing options...
Wandering Soulstar Posted November 27, 2018 Author Share Posted November 27, 2018 Thanks All ... in the end there was too much additional code for this to work right independent of one large or multiple calls ... will in the end leave it as each blind moving one after the other. 1 Link to comment Share on other sites More sharing options...
ellestones Posted November 28, 2018 Share Posted November 28, 2018 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 More sharing options...
animats Posted December 3, 2018 Share Posted December 3, 2018 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 More sharing options...
Recommended Posts
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