which is faster (a repeat structure question)

Shari gypsyware at earthlink.net
Thu Sep 26 10:19:00 EDT 2002


>test3 is the other method i mentioned.. perhaps it's not the repeat that's
>slowing it down, but the actually replacing?  for now it looks like i'll
>switch my code back to the slightly faster method 2..

I have a save handler that saves data changed in a standalone, and 
stores it in a stack, user preferences and the like.

The handler works very quickly except for one part...

There are about 30 fields in the standalone, with equivalent fields 
in the stack, and the save handler just put "fld x of cd 1 of stack 
theStandalone into fld x of cd 1 of stack theStack".  This handler 
was so slow, that instead of calling it every time there's a save, it 
only gets called when there's a change to those particular fields.

(All the other data is one word or phrase, so one field could hold 
many pieces of data.  All the globals that are one line are stored in 
the same field.  The 30 fields handle a big chunk of data each, so 
they need to be stored separately from each other.)

I toyed with the idea of creating 30 globals, putting the fields into 
the globals, and then putting the globals into the stack.

We'll see how it performs on my testers machines as it is, and if 
changes are needed, will diddle some more.
-- 
--Shareware Games for the Mac--
http://www.gypsyware.com



More information about the metacard mailing list