Sudden slowdown... - solved - but why?
Frank Leahy
frank at backtalk.com
Mon Jan 26 20:48:18 EST 2004
On Tuesday, January 27, 2004, at 01:27 AM,
use-revolution-request at lists.runrev.com wrote:
> But...why would the presence of a field with a few million characters
> in it
> slow down the interaction of the entire application?
1) Every time you add a line to a field Rev has to create a new block
of memory big enough, copy the old data, then concatenate your text.
Asking for a multi-megabyte block can be quite slow, and if there's
memory fragmentation there could also be virtual memory disk activity
slowing things down too.
2) The time required to copy from one multi-megabyte block to another
multi-megabyte block is non-zero, and is obviously 1000's of times
slower than copying a small 1000 byte block.
and
3) There may be significant additional field overhead that we don't
know about. For example, to speed up field searches, RunRev probably
calculates an index on the field each time the data changes (HyperCard
used to do that, so I'm assuming RunRev does something similar). This
could be quite expensive in terms of both time and memory.
-- Frank Leahy
More information about the use-livecode
mailing list