Jump to content

Do scripts affect LI?


Tattooshop
 Share

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

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

Recommended Posts

Hello there, fair scripters!

My friend asked me if scripts can influence LI?
I answered confidently - NO, this is not possible! But it seems so, they answered me. I began to sort out the possible options why this could happen. and then I remembered about Google (sorry for the ad). and found an interesting topic about LI where such a thing as Server weight is mentioned. I spilled water from a glass! looks like this is exactly the case? I felt like such a noob...
for me it was like ... why? .. why I don’t know such an elementary things?!
Do scripts really affect LI?

Y_U_NO_exploitable2.png

Link to comment
Share on other sites

4 minutes ago, sandi Mexicola said:

Thank you! :)  How do scripts affect LI, except indirectly by changing what they are inside of (for example)?

In this case, with a simple placement of several texture changers scripts into an object, the LI changed.

Link to comment
Share on other sites

Read this... 

 

Server impact in this context does NOT involve scripts. Phantom prims have the least server weight as they're effectively non-existent on the server side. Regular prims will consume server resources if avatars or other prims collide with them and physical require simulator time to compute trajectories based on collisions with other objects and actions for any potential motors invoked by the scripts.

Actually scripts inside prims do NOT affect server load, except to compete for the fixed allocation of script time available in each simulation frame. If there isn't enough time to service a script, it is delayed to the next frame. Having lots of scripts on a region will affect script performance but not frame rate.

Script load may affect LI, as an inducement to lower script usage.

Edited by Madelaine McMasters
  • Thanks 1
Link to comment
Share on other sites

Trees can be heavily scripted. (I'm only aware.. don't really know what I'm talking about). Those would 'affect' LI if many parts of (example) are scripted.. hence raising LI.   Although, server weight is definitely effected which would result in more 'lag'.  Hair can be heavily scripted, but that's on avatar.. so no LI there (still causing more lag from server weight. 

  • Thanks 1
Link to comment
Share on other sites

6 minutes ago, sandi Mexicola said:

Changing textures changes LI?

It's been a long time since the big LI discussion here in the forum, I recall some discussion of LI being affected by scripts that make calls that can load the grid servers in a "non script" fashion. As I explained earlier, script time is a fixed quantity that must be share by all scripts on a region. So script execution time doesn't affect the server much. However, it is possible for scripts to do things that do consume server resources, like enabling physics on an object, or causing asset transfers. A texture changer would qualify as such, I think, because it requires transfer of a texture file from the asset servers to the viewer.

I bet @Rolig Loon has a better understanding of this.

Edited by Madelaine McMasters
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

1 hour ago, Madelaine McMasters said:

I bet @Rolig Loon has a better understanding of this.

I bet I do too, but I can't lay my hands on the definitive reference.  We had a thread about his in either the Scripting form or the Mesh forum ages ago. It boils down to the fact that anything in an object that  uses server resources has an effect on L.I.   After all, the whole rationale for the system is to put a numerical value on how much of a region's resources each object is using.  A physical object clearly uses more server resources than a non-physical one, as you can see by the way that lag can skyrocket when there are lots of vehicles, basketballs, and windmills around.  A script that is moving a lot of stuff or changing prim properties repeatedly can also cause server load, so the idea is to put some portion of that load into the L.I. calculation.  I can't lay my hands on the formula, so I don't know how big a deal it is. I can't believe that a simple texture change script would make a difference, but if you had a script that was animating an object by using alpha switching to turn mesh faces on and off, for example, it would probably be measurable. 

Edited by Rolig Loon
typos. as always.
  • Thanks 1
Link to comment
Share on other sites

6 minutes ago, Rolig Loon said:

I bet I do too, but I can't lay my hands on the definitive reference.  We had a thread about his in either the Scripting form or the Mesh forum ages ago. It boils down to the fact that anything in an object that  uses server resources has an effect on L.I.   After all, the whole rationale for the system is to put a numerical value on how much of a region's resources each object is using.  A physical object clearly uses more server resources than a non-physical one, as you can see by the way that lag can skyrocket when there are lots of vehicles, basketballs, and windmills around.  A script that is moving a lot of stuff or changing prim properties repeatedly can also cause server load, so the idea is to put some portion of that load into the L.I. calculation.  I can't lay my hands on the formula, so I don't know how big a deal it is. I can't believe that a simple texture change script would make a difference, but if you had a script that was animating an object by using alpha switching to turn mesh faces on and off, for example, it would probably be measurable. 

This sounds familiar. It's not the script or its execution time that's causing the server load, but the additional work the physics simulator or asset servers must do as a result of the script's manipulation of the object it's in. I don't recall whether the LI impact of the script was determined statically during compile or after observing the script's impact once running.

Edited by Madelaine McMasters
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

4 minutes ago, Madelaine McMasters said:

I don't recall whether the LI impact of the script was determined statically during compile or after observing the script's impact once running.

I don't either, and it strikes me that either way creates problems. The implication is that L.I. can be dynamic.  You could lower an object's L.I. by setting its scripts to Not Running (which I suppose it no less realistic than changing its L.I. if you stretch or squish it).   As a scripter, I would like to know if there are ways to control the amount of server weight that my scripts contribute.  I understand that there are qualitative effects, but it would be nice to know the quantitative ones.

  • Thanks 1
Link to comment
Share on other sites

It's a little tricky. In general, each individual script increases Server weight by 0.25, but only if that plus 0.5 per link totals less than 1.0 per link. Of course, Server weight isn't necessarily the "heaviest" in the Land Impact calculation, so in a complex mesh with massive Download weight, the whole Server weight won't make a difference to LI.

The whole calculation went through some changes as mesh was introduced. Here's where the current (final?) calculation was specified, as of August 2012, (emphasis mine) thus:

Quote

Changed prim accounting for legacy prims which use the new accounting system

  • All legacy-style prims have their streaming cost capped at 1.0 (except for sculpts, which will be capped at 2.0). This provides the benefit of not penalizing prim-based creators for optimizing their content by opting into the new system and will make the streaming cost more reflective of the true network cost of the objects.
  • Server cost will be adjusted to MIN{ (0.5*num_prims) + (0.25 * num_scripts), num_prims }. This preserves the current value for unscripted linksets and reduce the cost for linksets containing fewer than 2*num_prims scripts. It provides the benefit of rewarding creators for reducing the number of scripts in their objects.

[ETA: It's not that I carry around in my head an index to server release notes. I got to that from a wiki search that turned up an old page that helpfully noted that it was made obsolete by those release notes.]

Edited by Qie Niangao
  • Thanks 3
Link to comment
Share on other sites

2 hours ago, Qie Niangao said:

It provides the benefit of rewarding creators for reducing the number of scripts in their objects.

And their statement is completely laughable which is why I filed a request to have scripts count correctly towards land impact as part of Project Arctan.

Edited by Lucia Nightfire
  • Thanks 2
Link to comment
Share on other sites

Link two 0.5 li mesh prims. Object shows 1LI total linked. Add a script. Sometimes it will now goto 2LI. It doesn't get worse than that though and its not everytime. Maybe its just scripts that call textures that do it, as mentioned above.

  • Thanks 1
Link to comment
Share on other sites

15 hours ago, rasterscan said:

Link two 0.5 li mesh prims. Object shows 1LI total linked. Add a script. Sometimes it will now goto 2LI. It doesn't get worse than that though and its not everytime. Maybe its just scripts that call textures that do it, as mentioned above.

An explanation has already been cited twice in this thread.

A script adds 0.25 to server cost up to 0.5 or two scripts max per link. Adding more scripts in a link will not increase server cost.

Server cost today can be easily eclipsed by the streaming cost of mesh present in the linkset.

Part of the land impact calc involves a max(streaming cost, physics cost, server cost) approach.

This is why I filed THIS REQUEST HERE that scripts have their own additional accounting on top of this so actual impact on the server is not overridden by streaming cost.

Edited by Lucia Nightfire
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

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