Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

[BUG-9382] llSetMemoryLimit Memory Consideration #16889

Open
3 tasks
sl-service-account opened this issue Jun 1, 2015 · 0 comments
Open
3 tasks

[BUG-9382] llSetMemoryLimit Memory Consideration #16889

sl-service-account opened this issue Jun 1, 2015 · 0 comments

Comments

@sl-service-account
Copy link

sl-service-account commented Jun 1, 2015

How would you like the feature to work?

When llSetMemoryLimit was first implemented, Babbage Linden (who is no longer with us) had three projects: efficient scripts, small scripts, and big scripts. The first two were implemented, but the third never was. Babbage had originally intended to allow scripts to request megabytes of memory, but this request is more conservative.

  • Allow llSetMemoryLimit to request *up to* 128kb or 256kb of memory (whichever is more feasible)

  • Throttle script performance in cases where less than 50% of the memory requested is being used

    Why is this feature important to you? How would it benefit the community?

    Larger scripts are – and have been for a long time – a pressing need. The current 64kb script memory limit isn't just inconvenient: it's unhealthy for the servers.

    I am not an inexperienced scripter. I'm familiar with memory-saving techniques, conservation of script time, and trying to manage my data in a fashion that isn't wasteful from using bitwise operations to store information to how to use math operations and more. I try to improve all the time.

    Nonetheless, it's a simple fact that some scripts (especially with the advent of mesh and upcoming experience keys for game-like interfaces) are too complex to fit in 64kb and leave enough memory to run. For many complex end-user applications, a scripter is *forced* to split one script into two or more and devote a sizeable portion of the freed memory in both scripts *just* to communicating between the scripts and avoiding race conditions to carry out the same operations. This also increases the server's script time and event queue. Most of the time, with normal memory-saving techniques, this could have been totally avoided if just one script had been given even a little more generous memory limit, and ultimately cost less memory overall because you don't have to allot script memory for both scripts or their communication.

    Given the chance, many script writers would jump at being able to shrink their multi-script items into one. I think most have given up hoping (myself included, except I'm writing this JIRA). Script optimization can only carry you so far, and people who are less familiar with scripting will often resort to even less efficient means of getting done what they're trying to do.

    So, in the "big picture," the 64kb memory limit may be a generous "default" memory setting, but it's important that higher script memory limits be allowed. As it stands, many scripters grind their teeth trying to crunch numbers that can't be crunched when working on more complex projects, and overall having that insurmountable limit is more damaging to the sim environment than it is beneficial due to the methods scripters must resort to.

    Thank you for reading.

Links

Related

Original Jira Fields
Field Value
Issue BUG-9382
Summary llSetMemoryLimit Memory Consideration
Type New Feature Request
Priority Unset
Status Been Triaged
Resolution Triaged
Reporter Sebastean Steamweaver (sebastean.steamweaver)
Created at 2015-06-01T21:37:09Z
Updated at 2017-08-23T04:39:06Z
{
  'Business Unit': ['Platform'],
  'How would you like the feature to work?': 'When llSetMemoryLimit was first implemented, Babbage Linden (who is no longer with us) had three projects he was heading: efficient scripts, small scripts, and big scripts. Efficient scripts and small scripts were, for the most part, implemented. Now, bear with me. Hear me out. Yes, the next words I will say are "big scripts" but this feature request is more moderate.\r\n\r\nBig Scripts, and using llSetMemoryLimit to request memory amounts larger than 64kb was never implemented. I\'m not sure if that\'s because Babbage left LL before it could be completed or for some other reason, but I think it is ultimately vital to have it reviewed in some form. So here is my proposal:\r\n\r\n* Allow llSetMemoryLimit to request **up to** 128kb or 256kb of memory (whichever is more feasible)\r\n* Throttle script performance in cases where less than 50% of the memory requested is being used',
  'Severity': 'Unset',
  'Target Viewer Version': 'viewer-development',
  'Why is this feature important to you? How would it benefit the community?': 'Babbage had originally intended to allow scripts to request megabytes of memory. This request is more conservative, however, larger scripts are, and have been, a pressing need for a long time. The current 64kb script memory limit isn\'t just inconvenient, but it\'s also unhealthy for the servers.\r\n\r\nI am not an inexperienced scripter. I\'m familiar with memory-saving techniques, being conservative with script time, and trying to manage my data in a fashion that isn\'t wasteful, from using bitwise operations to store a ton of data to how to use math operations and more. I try to improve all the time.\r\n\r\nIt\'s just a simple fact, however, that some interfaces (especially with the advent of mesh) are too complex to fit in 64kb and still have memory to run, especially user interfaces. For many complex end-user applications, a scripter is **forced** to split one script into two or more, and must devote a sizeable portion of the freed memory in both scripts **just** to communicating between the scripts and avoiding race conditions to carry out the same operations. This also increases the server\'s script time and event queue. Most of the time, with normal memory-saving techniques, this could have been totally avoided if just one script had been given even  a little more generous memory limit, and ultimately cost less memory overall because you don\'t have to allot script memory for both scripts or their communication.\r\n\r\nGiven the chance, many script writers would jump at being able to shrink their multi-script items into one. I think most have given up hoping (almost myself included, except I\'m writing this JIRA). Script optimization can only carry you so far, and people who are less familiar with scripting will often resort to even less efficient means of getting done what they\'re trying to do.\r\n\r\nSo, in the "big picture," the 64kb memory limit may be a generous "default" memory setting, but it\'s important that higher script memory limits be allowed. As it stands, many scripters grind their teeth trying to crunch numbers that can\'t be crunched when working on more complex projects, and overall having that insurmountable limit is more damaging to the sim environment than it is beneficial due to the methods scripters are forced to resort to.\r\n\r\nThank you for reading.',
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant