Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

List Limit??

Faminu Sojourner
Buttons aren't toys
Join date: 1 Oct 2004
Posts: 138
12-04-2004 13:25
Is there a limit to how many items can be in a list?? I am running across some weird errors when I get above 70 items.
Cross Lament
Loose-brained Vixen
Join date: 20 Mar 2004
Posts: 1,115
12-04-2004 13:33
Per the wiki...

From: someone
Note that while the LSL compiler will only accept your code with a maximum of 72 items in your list, lists can actually support as many items as your script's memory will allow. If you need a list of more than 72 predefined items, just concatenate two predefined lists into a new one: longlist = firstpart + secondpart;
:D
_____________________
- Making everyone's day just a little more surreal -

Teeple Linden: "OK, where did the tentacled thing go while I was playing with my face?"
Kex Godel
Master Slacker
Join date: 14 Nov 2003
Posts: 869
12-04-2004 13:35
I seem to recall lists can grow as big as your remaining memory.

Things to keep in mind though:

- If you make a function which modifies a list by taking a list argument and returning the list, both of those lists will consume memory simultaneously.

- Lists are expanded in "batches", not for each additional item. I think I've heard they reallocate memory in batches of 3.

- When you're done with a list and don't need it anymore, it still consumes the peak memory that it allocated (even when you set it to an empty list). The only way to deallocate it is to reset the script.
Faminu Sojourner
Buttons aren't toys
Join date: 1 Oct 2004
Posts: 138
12-04-2004 13:57
Woot Thanks and Thanks for Wiki too (this helps tons!!!)