TOP TEN ways to Conserve Memory in your scripts!!!

Ambrosia chaosstar at gmail.com
Thu Feb 26 10:28:07 PST 2009


'1) use linked messages and other scripts for storing list data.'

This will not save total memory, just memory specific to a script. But
yes, it's handy.

2) use global variables and reuse them whenever possible
3) do inline value-assignment to variables when possible
3) in LSL, use list=(list=[])+newvalue to halven list memory usage
when assigning data. Makes no difference in MONO
4) Don't put code into a global function that gets only run at one
specific point in the code, even if it gets run repeatedly. Just put
the code at the location where it gets run.
5) If a check isn't necessary, don't make it. If your script only asks
for cam tracking perms at one point, don't check in
run_time_permissions if you just assigned cam tracking perms. It's
senseless.
6) Keep it simple, not stupid
7) Use various tiny memory savers, like checking for a list's length
with list != [] instead of llGetListLength(list)


On Thu, Feb 26, 2009 at 19:08, Fire <fire at eslteacherlink.co.kr> wrote:
> Hi everyone,
>
> I wonder if you could use this email thread, to share with the community
> some of your scripting secrets to conserve memory in your scripts
> I'll list only the few I know of!  Please add more to complete this
> list!!!!!!
>
> 1) use linked messages and other scripts for storing list data.
> 2) Use llGetFreeMemory() to get the amount free, and direct data flow to an
> alternate script when storing data
>
> and thats it!!! thats all I know of!  please add more!!!
>
> 3)
> 4)
> 5)
> 6)
> 7)
> 8)
> 9)
> 10)
>
> _______________________________________________
> Click here to unsubscribe or manage your list subscription:
> https://lists.secondlife.com/cgi-bin/mailman/listinfo/secondlifescripters
>
>


More information about the secondlifescripters mailing list