ID caching: how to test?

Alex Tweedly alex at tweedly.net
Sun May 12 18:51:07 CDT 2013


On 13/05/2013 00:26, Alex Tweedly wrote:
>
> 5. (I could be totally wrong here ...)
>     It's probably a 5-lines of code change.

I was totally wrong; it's much more intelligent than that. It caches 
multiple recently used IDs, not just the very latest one - so it's 
probably quite a bit more than 5 lines. New code to demonstrate this ...

    put the millisecs into t1
    put the id of button tName into tID
    put the id of button tName1 into tID1
    repeat 10000 times
       put the short name of control id tID  into t
       put the short name of control id tID1  into t
    end repeat
    put the millisecs-t1 && t &CR after msg


So
      I'm more convinced that it has been done well
      I'm less convinced the performance saving was worth the 
implementation effort :-)

-- Alex.



More information about the use-livecode mailing list