ID caching: how to test?

Peter Haworth pete at lcsql.com
Sat May 11 15:44:00 EDT 2013


On Sat, May 11, 2013 at 12:27 PM, J. Landman Gay
<jacque at hyperactivesw.com>wrote:

> Another test might be to load an image dynamically by script. Store a
> couple of images somewhere, and run a repeat loop that loads the text of an
> image object alternately between the two. In an uncached scheme it should
> reload each image from scratch on each call. In a cached scheme, the two
> images should be ready to display instantly.
>
> I think.
>

OK, redid my test.

This time put two images on a card, then executed the following script
several times:

*on* mouseUp

   *local* tstart

   *put* the milliseconds into tstart

   *repeat* 100000 times

      *get* the text of image id 1005

      *get* the text of image id 1006

   *end* *repeat*

   *answer* the milliseconds - tstart

*end* mouseUp

Results:

5.5.4: 96-99ms

6.0: 367-397ms

Even if this isn't testing the caching, something's up with 6.0

Pete
lcSQL Software <http://www.lcsql.com>



More information about the Use-livecode mailing list