Jump to content
MeshPromo

Question about script memory usage.

Recommended Posts

After delete a texture animation script made using LlSetTextureAnim, we can still see the animation.

1. Will it still use the same server resources as before delete the script?

2. If it still use the same resources, what are the reasons to delete that script?

Share this post


Link to post
Share on other sites

Once deleted, the script no longer uses any server resources.

The server will have to tell any viewers in range about the animation, but it's up to the viewer to apply it. (Or not: there's a debug setting, AnimateTextures, that can be used to disable texture animations in the viewer.)

  • Thanks 1

Share this post


Link to post
Share on other sites

Texture animation is a prim property.  It can only be started or stopped with a script, but it does not require a script to continue running.  Therefore, you can delete the script once it has started the animation.  There's not really much benefit to doing that, but it appeals to some people's sense of tidiness.

  • Thanks 1

Share this post


Link to post
Share on other sites
On 9/27/2019 at 3:45 PM, Rolig Loon said:

Texture animation is a prim property.  It can only be started or stopped with a script, but it does not require a script to continue running.  Therefore, you can delete the script once it has started the animation.  There's not really much benefit to doing that, but it appeals to some people's sense of tidiness.

If the script's sole purpose was to start an animation on a prim there is benefit to deleting the script once it has done that.  Even scripts that contain no events currently consume some resources on the server and must be checked every frame to ensure that they do not have any events pending.

  • Thanks 2

Share this post


Link to post
Share on other sites
1 minute ago, Rider Linden said:

If the script's sole purpose was to start an animation on a prim there is benefit to deleting the script once it has done that.  Even scripts that contain no events currently consume some resources on the server and must be checked every frame to ensure that they do not have any events pending.

True. The question really is whether there is "much benefit" to deleting the script, and that comes down to assessing how much script time is being charged against the total frame time by this one little script. Every little bit counts, of course, but unless the region is really running tight on server resources, the extra load of this one little script is trivial. Therefore, I do agree that it's tidier to get rid of the script, but I don't usually bother, personally,

Share this post


Link to post
Share on other sites

Little Things

Little drops of water,
Little grains of sand,
Make the mighty ocean
And the pleasant land.

Thus the little minutes,
Humble though they be,
Make the mighty ages
Of eternity.
-- Julia Abigail Fletcher Carney

  • Like 4
  • Thanks 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...