Learning Revolution
Sarah Reichelt
sarahr at genesearch.com.au
Wed Mar 9 17:33:54 EST 2005
Hi Mikey,
Although your email doesn't actually include any questions or ask for
advice, I thought I would jump in anyway as I have had a similar
experience converting a large HyperCard stack to Revolution :-)
In HyperCard, searching through multiple cards was extremely fast.
Something like:
mark all cards by finding "stuff" in bg fld "Data"
would return the results almost instantly even with thousands of cards.
Revolution doesn't do that in anything close to the same speed. My
stack was (I think) 3000+ cards. Search speeds on HyperCard were less
than 1 second. On Revolution they went to about 20 seconds.
However, Revolution has one enormous advantage over HyperCard as
regards data storage - fields can hold up to 4GB data instead of HC's
32K. In my case, I restructured the data to be stored in a single field
in a one card data stack. Where the original stack had fields, I used
columns.
Make an interface stack that takes the data from a single line and puts
it into the relevant fields, then have a save routine that assembles it
all back into a single line and puts it back into the data field.
Searching this data field can be incredibly fast, using filter, offset,
lineOffset, matchText or whatever.
As general rule, I avoid importing HyperCard stacks directly. I find
that Revolution's enhanced feature set usually gives me better methods
for doing the same task, so a re-design is worth the effort, unless it
is a stack I only need to run a couple of times.
Sarah
On 09/03/2005, at 2:26 PM, Mikey wrote:
> The (mission critical) app. that I'm going to be moving from HC to
> another environment has thousands or cards in it. Actually, it has
> tens of thousands of cards in it, but I've separated them into
> multiple stacks because there are logical reasons (time based) to do
> so.
>
> So, one of the first things I tried in RR was to create a stack with
> around 50,000 cards, put the id of the card into a field, then
> randomly pick a card in the stack, change the value in the field, go
> back to the first card and do a find for the value I was looking for.
>
> Searching through thousands of cards for a value in a field, or to
> pick a string out of a text field that is several lines long is part
> of what this stack does.
More information about the use-livecode
mailing list