Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

How do I maintain a list bigger than 16K

Lee Ludd
Scripted doors & windows
Join date: 16 May 2005
Posts: 243
03-15-2006 09:42
When someone arrives at my store, a sensor looks up his/her name on a list, and adds the name to the list if it's not already there.

In a few days, the script will reach its 16K limit, so I suppose the list will cease to grow. Maybe the script will even break.

One thing I could do it copy the big list onto a notecard, start a new list, and search both the notecard and the list. That seems inefficient.

Any other suggestions?
Ayrn Wake
Registered User
Join date: 7 Jan 2006
Posts: 39
03-15-2006 09:53
Well, what I'd do personally, is to do things daily, and archiving it by emailing the list to myself, clearing the list to start afresh. The problem here is that you won't be able to read people from the archived versions of the list. I mean, I guess you could, but its too slow reading from notecards, external sources, etc.
Keiki Lemieux
I make HUDDLES
Join date: 8 Jul 2005
Posts: 1,490
03-15-2006 10:06
You could set up a multiple script database system with a controller script.

When someone new is sensed, it sends out a link message to the database scripts, each script checks their list and responds with a TRUE/FALSE (and perhaps the amount of free memory in the script). If none of the database scripts have the avatar in it's list, the controller script assigns the new avi to the script with the most memory available.

I think it would be good to design some sort of dump feature that emails you the information and clears the database at some regular interval.
_____________________
imakehuddles.com/wordpress/
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
03-15-2006 10:21
It will indeed break, so I'd work a solution out soon!

You should definitely have an email dump after a certain size. What you might also consider is pasting that email into a notecard, and having it go through that line by line checking names. That would be relatively slow, but you're not limited by the 16K then.

N.B. Does anyone know if llGetFreeMemory accurately displays remaining memory dynamically these days? The wiki appears to say it doesn't, but there seems to be some confusion and the last comments are from last year.
Lee Ludd
Scripted doors & windows
Join date: 16 May 2005
Posts: 243
Thanks
03-15-2006 11:25
Thanks for these suggestions.

BTW, when the script starts, it initializes the list by reading names from a notecard. Then, from time to time, it emails any names that have been added since initialization. From time to time, I add the most recently discovered names to the notecard and start over.

llGetFreeMemory is a bit unstable. It'll give different results even when nothing has changed. But this has been a feature of memory management utilities for a long time. I suppose it's because the OS executes memory management procedures according to its own schedule.
Nexus Nash
Undercover Linden
Join date: 18 Dec 2002
Posts: 1,084
03-15-2006 21:26
In short you don't. Max limit to any _single_ script is 16k.
_____________________
Dianne Mechanique
Back from the Dead
Join date: 28 Mar 2005
Posts: 2,648
03-15-2006 22:20
From: Lee Ludd
Thanks for these suggestions.

BTW, when the script starts, it initializes the list by reading names from a notecard. Then, from time to time, it emails any names that have been added since initialization. From time to time, I add the most recently discovered names to the notecard and start over.

llGetFreeMemory is a bit unstable. It'll give different results even when nothing has changed. But this has been a feature of memory management utilities for a long time. I suppose it's because the OS executes memory management procedures according to its own schedule.
It is way easier to maintain these kind of lists and check for duplicates in a real database outside of SL altogether. There are a lot of people in SL, no matter what you do you will run our of space/notecards/whatever fairly soon anyway and the whole system will be slow long before that time.

Another thing to consider is that it kinda seems like your saying that you are emailing or IM'ing people on the list?? (hard to tell from your wording)

If that's the case, just don't bother. You will lose more business spamming folks in SL than you ever will by maintaining the list. SL is full of computer savy people that will go out of their way to ruin your day if you spam them. It's also a TOS violation.

If you want to maintain a customer list an "opt-in" one is really the only way to go, or keep track of your actual customers by having your vendors email their names to you when they buy something.
_____________________
.
black
art furniture & classic clothing
===================
Black in Neufreistadt
Black @ ONE
Black @ www.SLBoutique.com


.
Lee Ludd
Scripted doors & windows
Join date: 16 May 2005
Posts: 243
03-15-2006 22:42
From: Dianne Mechanique

Another thing to consider is that it kinda seems like your saying that you are emailing or IM'ing people on the list?? (hard to tell from your wording)


Nowhere in what I said do I see anything that should lead someone to think that "it kinda seems" like I'm spamming my customers. I'm sorry that it's hard (for you) to tell -- so I will state it now: I AM NOT.

I maintain a user's group for customers who want to receive occasional announcements from me.
Kyrah Abattoir
cruelty delight
Join date: 4 Jun 2004
Posts: 2,786
03-15-2006 23:02
use an external server
_____________________

tired of XStreetSL? try those!
apez http://tinyurl.com/yfm9d5b
metalife http://tinyurl.com/yzm3yvw
metaverse exchange http://tinyurl.com/yzh7j4a
slapt http://tinyurl.com/yfqah9u
Keiki Lemieux
I make HUDDLES
Join date: 8 Jul 2005
Posts: 1,490
03-16-2006 04:19
From: Lee Ludd
llGetFreeMemory is a bit unstable. It'll give different results even when nothing has changed. But this has been a feature of memory management utilities for a long time. I suppose it's because the OS executes memory management procedures according to its own schedule.

I don't really know if it is or not, but it's fine for the purpose of making sure your script doesn't break. When I use it I have some check that when the memory drops below a certain threshold (maybe 1000K for instance), it stops adding new items to the list. llGetFreeMemory works fine for something like that.
_____________________
imakehuddles.com/wordpress/
Yumi Murakami
DoIt!AttachTheEarOfACat!
Join date: 27 Sep 2005
Posts: 6,860
03-16-2006 04:39
From: Nexus Nash
In short you don't. Max limit to any _single_ script is 16k.


However, you can fill each prim with scripts for 16k each - and then if you need more, you can automatically rez and link extra prims.

How this creates less server load than a script being able to request more memory directly I'm not sure ;)
Mad Wombat
Six Stringz Owner
Join date: 21 Jan 2006
Posts: 373
03-16-2006 05:00
How can u access a list in another script file?
Keiki Lemieux
I make HUDDLES
Join date: 8 Jul 2005
Posts: 1,490
03-16-2006 05:02
You use link messages. In one script you send a request message to get certain info from the list. The script with the list recieves the link message, queries the list and sends back another link message.
_____________________
imakehuddles.com/wordpress/
Mad Wombat
Six Stringz Owner
Join date: 21 Jan 2006
Posts: 373
03-16-2006 08:49
Thx a lot. Btw how many user IDs will fit into a list?
Keiki Lemieux
I make HUDDLES
Join date: 8 Jul 2005
Posts: 1,490
03-16-2006 08:53
dunno... I'll guess more than 100, less than 250.
_____________________
imakehuddles.com/wordpress/
Dianne Mechanique
Back from the Dead
Join date: 28 Mar 2005
Posts: 2,648
03-16-2006 09:29
From: Lee Ludd
Nowhere in what I said do I see anything that should lead someone to think that "it kinda seems" like I'm spamming my customers. I'm sorry that it's hard (for you) to tell -- so I will state it now: I AM NOT.

I maintain a user's group for customers who want to receive occasional announcements from me.
Well Jeez! :rolleyes: Way to overreact.

I thought that's what you were implying. You have my deepest heartfelt apologies for even thinking of implying that this is what you meant.

*bows and scrapes out of the room*

(If you are making a list of customers an opt-in list is still the only way to go though if only for the reason that it keeps your database a lot smaller)
_____________________
.
black
art furniture & classic clothing
===================
Black in Neufreistadt
Black @ ONE
Black @ www.SLBoutique.com


.
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
03-16-2006 10:22
I've never actually tested to desctruction, but I did some number crunching around a simple prototype for this.

With the in and out messaging etc. I figured 100 keys per script was safe - you'd probably get about 125 in if I remember the numbers correctly. Names are more variable in length but typically way shorter than keys - so you'd get some more in.
Mad Wombat
Six Stringz Owner
Join date: 21 Jan 2006
Posts: 373
03-16-2006 11:37
Thx for the info. Guess i have to use 20 to 40 scripts just to save the names.
See, I'm planning to script a lottery script selling a ticket for 1L. Each ticket will be saved in the list. Additionally, the script will create an empty ticket for every ticket bought, so there is a 50 % chance of no winner at all (the jackpot will stay for the next drawing).

So in order to decrease the number of lists needed, I have to increase the price per ticket so people will buy less. :-/
Lee Ludd
Scripted doors & windows
Join date: 16 May 2005
Posts: 243
03-17-2006 05:54
I want to thank the scripters who responded to my question with constructive, on-topic advice and information.

What I ended up doing is recoding the script so the it dumps the list into an email at midnight, then starts over. There is no danger that I will ever run out of space in a single day.
Mad Wombat
Six Stringz Owner
Join date: 21 Jan 2006
Posts: 373
03-18-2006 11:00
I got 150 keys in a single list without problems. Do keys have a fixed length?