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
asm
Wanderer


Joined: 19 Jul 2004
Posts: 68

PostPosted: Tue Jun 05, 2007 6:35 am   

Exceptionally large stringlists
 
I've been utilizing a script that takes a list delimited by commas and stores it in the Stringlist variable type in zmud. While everything works for smaller lists, I've had some problems when scaling things to be slightly larger.

Specifics: A list of ~1300 items is trucated to 1096 items in the stringlist.

Anyone happen to know of a workaround/way to fix this? Is overflowing to a second stringlist the only reasonably viable option, or is there a way to have it stored monolithically?
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Tue Jun 05, 2007 9:04 am   
 
I don't think the system was ever intended to be used for lists that long. You'll probably find it to be very slow doing some operations on a list that large.

That said, I didn't have any problems making string lists 1300 items long. I used the test command #loop 1300 {#additem test {test %i}} and the list formed properly. Perhaps it's a memory issue? You might find it useful to use zMUD's database component instead.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
asm
Wanderer


Joined: 19 Jul 2004
Posts: 68

PostPosted: Tue Jun 05, 2007 2:43 pm   
 
Hmm. Perhaps this is the culprit?

#REGEX {(.*)} {temp=%concat( @temp, %replace( "%1", ",", "|"))} "" {disable}

(At the end of parsing, it dumps temp into a stringlist)

Using a db might be viable, but, one question... With a list, I can trigger on @somestringlist and it will match any row without needing to go through a loop to check each one manually. Is it possible to do something like this while using a db component?
_________________
My collections of scripts.
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