All this talk about DataBases
Andre Garzia
soapdog at mac.com
Wed May 30 00:14:44 EDT 2007
On our lexicon stack we have each card name being the word it stores,
we use a combination of filters and RegEx to search the data, this
way, I don't need to loop the cards, I just need to iterate over the
cardnames, thats why it is fast. I think if you create smart indexes
and use clever regular expressions to find stuff in this index,
revolution performs very well.
so in the end, we have our storage in a stack database, but our
search routines use indexes to find stuff. Still everything is on RAM
and RAM is faster than disk access.
andre
On May 30, 2007, at 1:06 AM, J. Landman Gay wrote:
> Scott Kane wrote:
>> I'd be curious to know why RR decided to change the behaviour of
>> how stacks are read (from file as opposed to loaded fully into RAM).
>
> They didn't; the engine has always worked that way since its
> original MetaCard incarnation. Scott Raney, the creator, wanted
> speed and so wrote the engine to load everything into RAM. The
> trade-off is that you need as much RAM as the size of your stack --
> which is one reason why a dedicated database is more suitable for
> huge data sets.
>
> Raney's standard suggestion was that databases larger than 5,000
> cards should be moved to a "real" external database. Stacks under
> that number perform acceptably well. I have pushed it to 10,000 or
> so without any particular indexing or special efforts, but it does
> slow down, especially if you use the "find" command to locate
> content. HyperCard had its wickedly fast "hint bits" search that
> Rev doesn't have. When Rev searches, it has to look through the
> text of every field which is much slower. However, if you create an
> index and the scripts reference cards by ID (the fastest way) you
> can increase the number of cards without too much lag.
>
> I wrote a database with over 40,000 records, and for that one I
> loaded a text file into RAM and then used a 1-card display stack to
> show the desired record. This method requires that you write all
> your own navigation and search handlers, but it was about as fast
> as HC when I was done.
>
> --
> Jacqueline Landman Gay | jacque at hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list