10000 fields and crash

Wilhelm Sanke sanke at hrz.uni-kassel.de
Fri Oct 17 19:24:09 EDT 2003


This is a re-sent message. The original post was sent a week ago and
apparently got lost during the shut down of the mail servers.

 On Wed, 08 Oct 2003 Richard Gaskin wrote:


> That post explained _what_ was acheived, but not _why_ it couldn't be
done
> with fewer fields.   Did I miss something obvious?
>
> I'm curious too:  Why not just one field, or at most a different field
for
> each column.
>
> --
>  Richard Gaskin
>

You are certainly right with that question, but after all it is not
unimportant what you can achieve with a specific tool.
Testing the limits of Metacard - or any other programming system - can
provide you with an overview about the range of possibilities. And
sometimes - testing the limits - you expose an underlying programming
error that may be relevant for other parts of an environment as well.

On at least two occasions Scott Raney detected such underlying errors
after an exchange of posts we had offlist about the use of MetaTalk in
somewhat extreme conditions.

One case involved a memory game with visual effects where I had
encountered crashes which occured after about the 300th repetition of
the uncovering of a memory image. Another one was connected  to using
paint tools with drawing color lines with pencil and brush tools where
crashes happened after repetition 500 or so.

In both cases Scott appreciated to be able to fix an underlying memory
leak that was relevant for other parts of the engine, too.--

Apart from this, you are of course right when you ask, can't this be
done in a simpler way? This reminds me also of the about 1500 lines of
code for the controls field of the old Rev Application Overview - an
example I have used several times now - that could be substituted by
only 250 lines of code to achieve the very same effects.

I dimly remember someone had developed a prototype of a spreadsheet with

MetaTalk, I do not know if he used one field with horizontal and
vertical grid lines or a number of separate fields.

To create such colorpatterns as I have (which are used and appreciated
by people in our Department of Arts) you can indeed work with one single

field by setting the backcolor of invisible chars.

Using one field with 5000 chars with different backcolors increases the
speed - when the colors are changed - about 4 times compared to 5000
separate color fields. "Saving"  time for the two different stacks does
not differ that much, you get an acceleration of the saving time of
about one third.

But a main feature of the colorpattern stack are the visual effects
produced by showing color changes of the fields in patterns that are
very different from that of the in-build visual effects and the effects
provided by QT.

Unfortunately - this has not yet been fixed - when you change rows (or
other directions of change) of background color of chars the changed
background colors appear in a different size than the previous colors
and are only adjusted to the proper size after a simulated click at the
field.

Because of this  the special visual effects in uncovering the new color
values cannot be produced - or at least appear as rather awkward - so I
continue to use 2700 to 5400 different fields instead on a card to
achieve a number of effects within a time frame that is acceptable for
both producing the effects and having a tolerable span of time for
saving such a stack  (given the mentioned configuration of my main
computer).

Regards,

Wilhelm Sanke





More information about the metacard mailing list