Can this be done faster ?
John Miller
johnmiller1950 at sbcglobal.net
Thu Jul 20 22:27:12 EDT 2006
JB,
I once wrote an inventory control program for a company using
Revolution. They had many thousands of items that I read out of
their database and then sorted and processed.
I found that using a repeat for that many items was extremely slow.
The solution that I found which made things blazingly fast was to
only process about 50 items at a time.
For instance:
put 50 into XX
put the ticks into timer
repeat until listXX is empty
put line 1 to XX of listXX into listYY
delete line 1 to XX of listXX
repeat with x = 1 to (number of lines in listYY)
doaction to line x of listYY
end repeat
end repeat
put the ticks - timer
Using the format above, you can experiment to see which value for XX
is the most advantageous. I was able to whittle my time down from 45
seconds to less than 1.
Good Luck
John Miller
More information about the use-livecode
mailing list