Jump to content

Time to switch to Mono?


Ernst Osterham
 Share

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

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

Recommended Posts

I have a bunch of weapons I have scripted that are attachments, and until now all the scripts have been compiled as LSL due to the problems of mono on tping into a sim or crossing sim borders. But do the recent changes make it safe to recompile in mono?


Depending on the type of weapon each gun has between 6 and 15 scripts. Usually two large scripts and a lot of tiny subscripts. Most of the math that needs to be done quickly is in subscripts, but a little in the main as well. Would it make sense to recompile everything as mono, or leave some as LSL?


Memory use really isn't so much an issue as the scripts really have no trouble staying under the 16kb limit, even for the larger main scripts. I'm more looking for performance and efficiency gains.

Link to comment
Share on other sites

my vote is still for LSO on frequently rezzed or region crossing scripts (that includes attachments). I may begin to revise that with the memory management tools becoming available

normally I'd say if it's a gun mono should be fine, because weapons users in SL generally run light... but 6 scripts per weapon seems high, 15 seems excessive... so I'd say at the monent stick with LSO..... and consider combining as many as possible. personally I only imagine 1-3 scripts. core option and firing in one, updater in another, and maybe a cross communicator for changes (like linked resize from a holster/sheath) in another, but usually that can be combing into one of the others.

Ammo Scripts should always be LSO, and if their environment for use allows it, NOT temp on rez

 

Reasoning:
LSO still transfers across regions better, and is less subject to region cross and rezzing lags, especially if the avatar is highly scripted... stable items should be fine with mono becuase they can only take the potential hit once (and the performance hit is smaller than it used to be for MONO). once rezzed/in-region MONO outperforms in every category

Link to comment
Share on other sites

Thanks for your advice.  The reason for the large number of scripts is due to various function calls that due to delays or lsl contraints can't be called in the two main scripts.  For instance, for fast firing semi-auto guns, full auto guns and shotguns, it's impossible to rez objects fast enough from one script due to the built in delays.  Thus it requires multiple sub-scripts which rez the bullets on command from the main script.  Certain particle effects, looped sounds, ejected shells, timers, and the like require their own script for similar reasons.  In most cases  using a long list of llSetLinked... functions from the main script results in too much delay versus the main sending out a linkedmessage to a subscript which then calls it locally.

One of my hopes with the mono changes is perhaps in the future once the memory management is fixed for certain I can use it to reduce the size of many subscripts below even the 16kb current LSL hard limit.  

As it is, the combined total memory use and script time of my most heavily scripted gun is less than half that of a ZHAO-II and the bullet is a single prim with two lsl compiled scripts inside.

Link to comment
Share on other sites


Void Singer wrote:

LSO still transfers across regions better, and is less subject to region cross and rezzing lags, especially if the avatar is highly scripted... stable items should be fine with mono becuase they can only take the potential hit once (and the performance hit is smaller than it used to be for MONO). once rezzed/in-region MONO outperforms in every category


How big a difference is it?   Is it worth having 4-6 LSO scripts instead of one mono script in an attachment?

I do a lot of sim crossings.

 

Link to comment
Share on other sites

temp_on_rez items are more aggressively queued when rezzing than normal items, which can lead to Matrix style "wall of bullets" effects if there are multiple shooters, which tends to end up with the region running a rubber band cycle of pausing them all then releasing them, which causes them to pause and release repeatedly.

 

@Rufus:

at that level, I'm not sure what a good cut off would be, and it'll probably depend on what the scripts are doing and how they interact.... at that point you may be trading in different performances gains... LSO is going to work more slowly while already on region, especially with link message overhead, or any other signalling, but if it's not a notable drop in performance, then it may be worth 4 vs 1 mono to get performance gains for region crossing.

in all cases (and I mentioned this in another thread) eliminating globals, user functions, and multiple states also increases on rez, and on-region-change performance, most notably for high speed objects that must react ASAP after either of those things happen (mostly "bullets" or similar). this applies to both compile types. I'm not sure how noticeable it'll be with vehicles, but you can easily measure the difference in weapons.

Link to comment
Share on other sites

right, that's why I said IF the environment supports it.... there are many combat regions that specify scripts are on in all parcels... this is not true of them all though, but gor and a few other meter coalitions tend to run this way.

if it's made to be used in other environments then sadly temp_on_rez is pretty much a necessity

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4633 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...