Strided list maximum...? - SLUniverse Forums
Navigation » SLUniverse Forums > Development Discussion and Support > Scripting » Strided list maximum...?


Scripting Discuss scripting and programming for SL and other platforms

 
Reply
 
LinkBack Thread Tools Display Modes
Old 05-30-2012, 11:18 PM   #1 (permalink)
Senior Member
Meaw
 
Join Date: Feb 2011
Location: Canada
Posts: 111
SL Join Date: 2005
Client: Official
Strided list maximum...?

Hello everyone!!!

I'm currently designing a server that will collect different kinds of information according to the key of a user. Now, i'm wondering if the function llList2ListStrided() has a limit amount of strides.

What i'm thinking is something like this; "Abdul" "Key of the resident" "date of birth" "Last time online" "Total hours online, hh:mm:ss" "Total amount in L$ collected" "date + time of last collection transaction" "Total amount in L$ donated" "date + time of last donation transaction"

sooooo.....is that too many strides to use in one line? And how much of that information would i be able to fit into one script? Resident wise? ~250?

Thanks in advance, I want to test it out but i would require 250 people to do things on my servers...are there any ways to test all of this out?
Abdul is offline   Reply With Quote
Old 05-31-2012, 06:36 AM   #2 (permalink)
That Bitch

*SLU Supporter*
 
Void's Avatar
Innocent as far as you know
 
Join Date: Nov 2011
Location: Online
Posts: 6,232
My Mood:
SL Join Date: late 04... that account is deleted now
there is no theoretical limit to the number of strides, however there is a memory limit...
it should be possible to store the equivalent of ~200 keys safely IIRC.

given the above information, I'd expect ~30 records (assuming that the elements are not actually text but mostly timestamps and other integers) depending on the amount of code being used in the script.

best suggestion is to modify the script slightly so that it duplicates record upwards in batches of 5 testing and reporting the current number is supported.

you may find that separate lists for each field, with each index being a unique record allows you more records, since several functions can duplicate the list in place, effectively doubling it's size while being manipulated. there is a cost in overhead for handling each list separately though and I've never tested whether there's a breakg even point where it becomes better to use one method or the other.
__________________
- These eyes can do more than see
Quote:
Originally Posted by Cajsa Lilliehook View Post
It's not enough to care about liberty if the only liberty you care about is your own.
Quote:
Originally Posted by Jupiter Firelyte View Post
Why doesn't anyone ever ask, "What is the real meaning of the winter solstice?"
Quote:
Originally Posted by Eboni Khan View Post
Thanks for being passive agressive.
Void is offline   Reply With Quote
1 User Agreed:
Old 05-31-2012, 10:12 AM   #3 (permalink)
Nasty Brit
 
Innula Zenovka's Avatar
Wants *things*
 
Join Date: May 2009
Posts: 6,979
SL Join Date: 17 June 2007
Business: Something Spunky
You should be able to save some memory by calculating various fields when you need them. For example, you certainly don't need to store someone's name or date of birth when you have their UUID.
__________________
Innula Zenovka is offline   Reply With Quote
2 Users Agreed:
Old 05-31-2012, 03:50 PM   #4 (permalink)
Senior Member
 
Join Date: Feb 2012
Posts: 191
If your code ( many functions , and states and events used ) takes 64k , 0 element

It depends too of the repetition of the elements of your list .

This script crashes after 15 000 keys

PHP Code:
list l;
list 
laux;

default
{

    
state_entry()
    {
        
laux = [ llGenerateKey(),llGenerateKey(),llGenerateKey(),llGenerateKey()];
    }
    
touch_start(integer total_number)
    {
        while ( 
TRUE)
        {         
            
llSetText((string)llGetListLength(l),<1,1,1>,1); 

            
+= laux
        }
    }

Without repetition , this script will cras after 600 keys
PHP Code:
list l;
list 
laux;

default
{

    
state_entry()
    {

    }
    
touch_start(integer total_number)
    {
        while ( 
TRUE)
        {         
            
llSetText((string)llGetListLength(l),<1,1,1>,1); 

            
+= [ llGenerateKey() ]; 
        }
    }


The elements of the lists can be stored by reference/pointer if they are repetitive .

Nevertheless , when i see the nature of your records , i don t think it will often happen

Of course , i do the hypothesis you compile in MONO ( crash after 160 keys in LSO in the 2 instances )

Last edited by miranda; 05-31-2012 at 04:00 PM.
miranda is offline   Reply With Quote
Old 05-31-2012, 09:25 PM   #5 (permalink)
Senior Member
Meaw
 
Join Date: Feb 2011
Location: Canada
Posts: 111
SL Join Date: 2005
Client: Official
So....it would be safe to say that it would be a better idea to set up an outside server and have it communicate with SL?
I'm thinking something in the lines - have the email send the most resent info and pile it all up in a external server.
Abdul is offline   Reply With Quote
Old 05-31-2012, 11:35 PM   #6 (permalink)
That Bitch

*SLU Supporter*
 
Void's Avatar
Innocent as far as you know
 
Join Date: Nov 2011
Location: Online
Posts: 6,232
My Mood:
SL Join Date: late 04... that account is deleted now
Quote:
Originally Posted by Abdul View Post
So....it would be safe to say that it would be a better idea to set up an outside server and have it communicate with SL?
in general for a whole bunch of reasons... yes

Quote:
I'm thinking something in the lines - have the email send the most resent info and pile it all up in a external server.
you can also use llHttpRequest to send post data to a php script, or to query the same external server.... email is a bit slow for LSL
Void is offline   Reply With Quote
Old 06-01-2012, 04:10 AM   #7 (permalink)
Senior Member
 
Join Date: Feb 2012
Posts: 191
Quote:
Originally Posted by Abdul View Post
So....it would be safe to say that it would be a better idea to set up an outside server and have it communicate with SL?
I'm thinking something in the lines - have the email send the most resent info and pile it all up in a external server.

It depends how your operations on the datas need to be sophisticated .

You may use several scripts to store the datas .
One script plays the role of controler/manager . receives from the world what is the record to append , and communicates with llMessageLinked to the other scripts, to fetch or to append
The other scripts have all the same code between them . It s just a duplication of the same script. Each script keeps a fragment of the datas ( for instance , each scripts keeps in memory 50 records )
So for instance , in your prim you could have in the inventory
- Main script
- data script.1
- data script.2
- data script.3
- data script.4
- data script.5
Inside the llMessageLinked( integer linknum, integer num, string str, key id ) event , the slave script tests , for instance , the num parameter , to know if the message from the main script is for it or for an another slave script

Last edited by miranda; 06-01-2012 at 04:33 AM.
miranda is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On