|
Ralph1971 Wanderer
Joined: 01 Mar 2008 Posts: 64
|
Posted: 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?
|
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: 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. |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: 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 |
|
|
|
Ralph1971 Wanderer
Joined: 01 Mar 2008 Posts: 64
|
Posted: 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. |
|
|
|
|
|