Near completion of Color Pattern Toolkit: IDE, engine, and font problems (part two)

Wilhelm Sanke sanke at hrz.uni-kassel.de
Fri Nov 25 15:29:50 EST 2005


An additional remark concerning the reported engine leak (Windows XP and 
MacOS):

The increments in script execution time occur probably in many scripts, 
if not in all, although for shorter scripts with no loops or limited 
loops this may be hardly noticeable.

One example which I just tested:

There are six buttons in the color pattern toolkit that can store the 
color values of a given image for further processing or later retrieving.

The following script stores the values in a one-dimensional array and 
customproperty.

"put 0 into counter
  repeat for each Char C in fld 1
    add 1 to counter
    put the backcolor of char counter of fld 1 into aColor[counter]
  end repeat
 set the customproperties[oldColors] of me to aColor"

For the roughly 20.000 chars this takes 550 milliseconds when the stack 
has been newly opened on my XP computer.

For each subsequent running of the script an increment of 20 to 40 ms 
occurs, but this is an average increment, as it does not go up 
consistently. In between small decrements can happen, but overall the 
execution time goes up.

After a number of about 30 runs the execution time of the above script 
reaches 1500 milliseconds.

On the basis of this observation it is understandable that during a 
session with the toolkit - where all the time color values are put into 
arrays for faster processing or transforming inside the array or between 
two or more arrays - that performance gradually gets very slow and the 
engine may choke for a while.
But never before using the additional scan feature illustrated in the 
test stack <www.sanke.org/Software/ScanTest2700.zip> I have experienced 
such a quick and devastating breakdown like I - and subsequently Xavier 
- have described in our posts.


Regards,


Wilhelm Sanke
<http://www.sanke.org/MetaMedia>






More information about the use-livecode mailing list