Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Ralph1971
Wanderer


Joined: 01 Mar 2008
Posts: 64

PostPosted: Sat May 17, 2008 3:51 pm   

variable lists
 
what is the max size a variable list can get? Is there one? at what point would it slow down to the point of being better to use a database when you check it?
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Sat May 17, 2008 4:01 pm   
 
Until you run out memory, I'd expect. There's certainly no soft limit that anyone's ever reached.

As for whether a database would be faster, it depends what sort of data you're storing and what sort of operations you're doing on it, really. If you start thinking it's too slow, try writing a database version and seeing if it's any better.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sat May 17, 2008 4:39 pm   
 
The technical limit is your memory. However, I've noticed it start getting problems with keeping track of data around several hundred or so items.
_________________
EDIT: I didn't like my old signature
Reply with quote
Ralph1971
Wanderer


Joined: 01 Mar 2008
Posts: 64

PostPosted: Sat May 17, 2008 6:05 pm   
 
hmm.. well, the list would start out small, and potentially stay small.. couple hundred items. But it does have the potential to become rather large as more items are added to it.
Here's the script as I have it now.. (and issues discussed after)
[/code]
#CLASS {bot}
#TRIGGER {&char gives you &{Item.Name}{.}} {#if (!%null( %query( &Name = @Item.Name, All))) {#SAY Item already exists;c 'midas touch' @Item.keyword}
{tell @char tell me midas <keyword> for this item.}}
#TRIGGER {@char tells you 'midas &item.keyword'} {#new all @item;c 'midas touch' @item.keyword}
[/code]
The database is called midas_items, and one problem I'm having is the first 'c midas touch' command in the the first trigger doesn't get the @item.keyword from the database. The second one 'char tells you' does add to teh database, and casts the spell, but then if I'm given a second item, it trips the first trigger and stals.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net