Difference between revisions of "User:Becky Pippen/Script Memory Limits"
Jump to navigation
Jump to search
Becky Pippen (talk | contribs) m (in anticipation of script memory limits) |
Kizmut Smit (talk | contribs) m (+cat :3) |
||
(One intermediate revision by one other user not shown) | |||
Line 2: | Line 2: | ||
Oh No! LSL script memory limits are coming! What to do? | Oh No! LSL script memory limits are coming! What to do? | ||
Don't panic. | Don't panic. [[User:Becky_Pippen/Memory_Limits_FAQ|'''See this FAQ''']], then see the strategy and checklist below and do what you need to do. | ||
==Strategy== | ==Strategy== | ||
Line 16: | Line 16: | ||
==Checklist== | ==Checklist== | ||
# ''' | # '''Measure''' - For help measuring the memory your script uses, see [[User:Becky_Pippen/Measure_Script_Memory_Usage|this page]]. | ||
# '''Requirements and goals''' - Do you know how efficiently your data currently uses memory? Do you know how much improvement is possible? For suggestions, see [[User:Becky_Pippen/Memory_Efficiency|this page about measuring information content and memory efficiency]]. | # '''Requirements and goals''' - Do you know how efficiently your data currently uses memory? Do you know how much improvement is possible? For suggestions, see [[User:Becky_Pippen/Memory_Efficiency|this page about measuring information content and memory efficiency]]. | ||
# '''Scripts in child prims''' - If your object uses multiple scripts to detect changes in child prims, or for resizing or retexturing all the prims in a linkset (like some hair or shoes), see [[User:Becky_Pippen/New_LSL_Functions|the new LSL functions]] to reduce this to a single script. | # '''Scripts in child prims''' - If your object uses multiple scripts to detect changes in child prims, or for resizing or retexturing all the prims in a linkset (like some hair or shoes), see [[User:Becky_Pippen/New_LSL_Functions|the new LSL functions]] to reduce this to a single script. | ||
# ''' | # '''Hashing''' - Does your script need to remember lots of avatar names, keys, or other identifying information? If so, [[User:Becky_Pippen/Hashing|consider storing hashes of the data instead]]. | ||
# '''Strings/Text''' - If your script contain a large number of strings for error messages or help text, perhaps in multiple languages, see [[User:Becky_Pippen/Text_Storage| these suggestions for storing text data]]. | |||
# '''Numeric data''' - If your script needs to store long lists of numeric data, see [[User:Becky_Pippen/Numeric_Storage|these suggestions for storing numeric data]]. | # '''Numeric data''' - If your script needs to store long lists of numeric data, see [[User:Becky_Pippen/Numeric_Storage|these suggestions for storing numeric data]]. | ||
{{Resource Conservation Portal Nav|cat=memory}} |
Latest revision as of 14:38, 31 March 2014
Script Memory Limits
Oh No! LSL script memory limits are coming! What to do?
Don't panic. See this FAQ, then see the strategy and checklist below and do what you need to do.
Strategy
To reduce script memory usage, start with the big items first before tweaking individual lines of code. Sorry, I'm not impressed if you save a dozen bytes through some clever rearrangement of a formula here or a statement there. First see if you can eliminate entire scripts or whack off thousands of bytes all at once by using a different approach or algorithm, or by removing that one memory-hungry feature, or by using a different data storage format. Then review the checklist below for more ideas.
Checklist
- Measure - For help measuring the memory your script uses, see this page.
- Requirements and goals - Do you know how efficiently your data currently uses memory? Do you know how much improvement is possible? For suggestions, see this page about measuring information content and memory efficiency.
- Scripts in child prims - If your object uses multiple scripts to detect changes in child prims, or for resizing or retexturing all the prims in a linkset (like some hair or shoes), see the new LSL functions to reduce this to a single script.
- Hashing - Does your script need to remember lots of avatar names, keys, or other identifying information? If so, consider storing hashes of the data instead.
- Strings/Text - If your script contain a large number of strings for error messages or help text, perhaps in multiple languages, see these suggestions for storing text data.
- Numeric data - If your script needs to store long lists of numeric data, see these suggestions for storing numeric data.