Performance Mystery Solved - IT'S THE DATA STUPID!!

Richard Gaskin ambassador at fourthworld.com
Thu Nov 11 22:04:43 EST 2010


Monte Goulding wrote:

 > I ran a quick test with a stack with 500 graphics and a slightly
 > different script:
 >
 > on mouseUp
 >     put fld "file" into tStackFile
 >     --
 >    delete stack tStackFile
 >     put the millisecs into t
 >     repeat with X=1 to the number of grcs of stack tStackFile
 >          put the uTest of grc X of stack tStackFile into r1
 >     end repeat
 >     put the millisecs - t into t1
 >     --
 >     delete stack tStackFile
 >    put the millisecs into t
 >     toplevel tStackFile
 >     put the short name of stack tStackFile into tStack
 >     repeat with X=1 to the number of grcs of stack tStack
 >          put the uTest of grc X of stack tStack into r2
 >     end repeat
 >     close stack tStackFile
 >     put the millisecs - t into t2
 >     --
 >     put t1 && t2 &&(r1=r2) into fld "r"
 > end mouseUp
 >
 > Result: 1034 212 true
 >
 > There was no significant difference with destroyStack property true
 > or false. Adding another 500 graphics to the card resulted in this:
 > 8863 399 true
 >
 > Changing toplevel to go invisible stack resulted in this:
 > 8596 72 true

Great work, Monte!  Thanks for running that test.

So the difference is in addressing controls *within* a stack, but not 
with the stack itself.  Hard to anticipate, but very good to know.

So Peter has a solution, and I learned two new things today about 
performance.

A good day...

--
   Richard Gaskin
   Fourth World
   LiveCode training and consulting: http://www.fourthworld.com
   Webzine for LiveCode developers: http://www.LiveCodeJournal.com
   LiveCode Journal blog: http://LiveCodejournal.com/blog.irv




More information about the Use-livecode mailing list