Another speed dilemma
    Yennie at aol.com 
    Yennie at aol.com
       
    Fri Apr 18 19:02:01 EDT 2003
    
    
  
I think you really need to look into the multi-dimensional arrays here. By 
using uMap[x], you are speeding up one half (the x coordinate), but you are 
still counting lines when you say "line y of uMap[x]". The larger y gets, the 
slower this will be.
If you want the full speed up from arrays, you need something like this:
set the icon of cd btn bMap[z] to uMap[x,y]
Even though you say "line y of uMap[x]", this is still line counting. Just 
knowing the exact line number is not enough: Metacard still needs to read 1 
line at a time in order to count off lines and find the one you want.
For the sake of a quick test, you should be able to transform your existing 
array like this:
repeat with x=1 to 330
    repeat with y=1 to (number of lines in uMap[x])
       put line y of uMap[x] into uMap[x,y]
    end repeat
end repeat
Run this before your original script, then use the uMap[x,y] syntax. Time the 
second part and you should see a speedup.
HTH
<<
> repeat with x = gRow to (gRow + 8)
>      repeat with y = gCol to (gCol + 10)
>        set the icon of cd btn bMap[z] to (line y of uMap[x])
>        add 1 to z
>      end repeat
>    end repeat
> >>
------------------------------
Brian Yennie
Chief Technology Officer
QLD Learning, LLC
www.QLDLearning.com
PH: (904)-997-0212
EMAIL: Yennie at aol.com
-------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.runrev.com/pipermail/metacard/attachments/20030418/a221126e/attachment.htm
    
    
More information about the metacard
mailing list