Script Timing Issue - script slows down every time I run it
I Need Some Help with a Script-Timing Issue - a script running slower each time I run it. FMP11 and mac mini running OS 10.6.3 is my configuration.
(I posted an earlier note about my script running slower each time I executed it "Script Gets Slower Every Time I Run it." - 05-24-2010 01:18 PM). There were no responses, presumably because nobody knew what to make of it. However, I've done some more research and I am able to re-create the problem in a very, very simple form that eliminates any extraneous impact from my previous database.
I've started fresh with a 'virgin' FMP11 database, with only five tables, each table with 4 fields, and with anywhere from 0 to 43 records of randomly entered data in the various tables. I wrote a script that simply loops through each table using Go to Layout() 500 times.
Every time I run the script, it runs more and more slowly. E.G. run times started at 6 seconds, and after a few screwed up timings, were 11, 11, 12, 14, 15, 16 seconds for six runs. After six runs, I noticed that my hard disk was very active (a mac mini with 5600 rpm drive), so I waited several minutes for the disk activity to stop. Then I ran the test again - 17 seconds! I waited between each run for a while and got 17, 17, 18, 18, 19 and 19 seconds per run. No matter how long I wait for the disk to settle down (e.g. 10 minutes), the script never gets any faster. If I quit Filemaker and re-start, the timings go back to 6 seconds and then start increasing with each run. This test database has only the 5 tables I described, zero relationships, one script, and nothing else.
Does anyone have any suggestions on what's going on here?
(I started out this process of running a script multiple times to try and get a reasonably accurate timing for optimizing a different script - but even though I won't be running it that frequently, it is a long, slow script that could be run several times at month end - otherwise, I'd just forget about the whole thing and accept that it will be slower on subsequent runs. If Filemaker actually slows down so dramatically with more frequent running of a script, my application becomes somewhat useless - and it's the only reason I bought Filemaker.)
(BTW, I'm still a newbie - so please be gentle)