Re: Slow FileMaker Scripting Code
Re: Slow FileMaker Scripting Code
- Subject: Re: Slow FileMaker Scripting Code
- From: Malcolm Fitzgerald <email@hidden>
- Date: Thu, 23 Nov 2006 10:28:17 +1100
On 23/11/2006, at 3:00 AM, David Crowe wrote:
The code I'm going to paste in below is excrutiatingly slow, about 3
seconds on my computer to create one record and then fill in about 40
fields.
Almost all the time is taken up setting the fields to the individual
values.
I've observed that FileMaker fills in the fields individually, you can
actually watch the fields populate in order on the screen (very
slowly). This is a performance problem when multiplied by a thousand
or two. It's barely quicker to set all the cells at once than it is to
loop and set them individually (especially when not all the cells need
to be set every time).
One alternative is to "create new record with data { <list of values>
}". This is lightning fast but it also means that a layout has to be
created with the fields to be populated in a specific order on the
screen (because the list in this case is just data, no cell names need
apply), which I'd rather avoid since it bothers me to have this
dependency (and it makes the code harder to port to another database).
But I suppose if I have to, I will.
If there are any speedier and more flexible alternatives, please let
me know.
I think you should be considering a fmp/applescript bundle. Build a
purpose built FMP database which contains your applescript code and has
as its sole purpose, the interaction with Address Book. That would make
it much easier for FMP people to incorporate your work with their own.
However, an alternative may be to use FMP export/import capabilities.
They are quick. You can generate a CSV file with the changes to make,
then do a scripted import.
malcolm
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users
This email sent to email@hidden