Re: Extreme performance drop if saved as app
Re: Extreme performance drop if saved as app
- Subject: Re: Extreme performance drop if saved as app
- From: daniel <email@hidden>
- Date: Sat, 9 Apr 2005 11:33:02 -0700
Hi Håvard!
I don't have any ideas in particular. This is the kind of thing that
there are many "programmer" type approaches to try to hunt it down. If
you're not familiar with development tools and techniques it might be a
little harder.
One first step you could take is to "sample" the application at the
height of its slowness. Apple has made this easy for anybody to do by
including a UI for taking a sample in the Activity Monitor application
(in the Utilities folder).
1. Launch your app and let it get slow.
2. Launch Activity Monitor.
3. Locate your app and select it.
4. Click the "Inspect" button from the toolbar.
5. Click the "Sample" button at the lower left of the info window.
This will tell you which functions (system-level calls, not applescript
functions) your app is spending most of its time in. It might reveal
something that somebody will have an "aha" about.
Daniel
On Apr 8, 2005, at 2:10 AM, Håvard Graudo wrote:
I have a script that parse XML-files and put the contents into 5
related filemaker databases. Neither very complex nor very huge stuff.
It is designed to be drag&drop, so I save it as an application.
I use Script Debugger and when I drop files directly on the open
script window to trigger it, performance is nice and fast.
However when I save it as an application it starts out fast, but
performance crawls to a near standstill.
Comparable results are: 227 seconds vs. 5503 seconds parsing the same
files. (not a typo: that is 4 minutes from Script Debugger vs. one and
a half hour (!) when running as a script application)
What is happening and where should I start digging to solve this?
Thanks for any suggestions,
Håvard
-----
The numbers:
I timed the difference, also noting the CPU load as the script was
running:
Running from Script Debugger:
Time to complete: 227 sek
CPU load Script Debygger: around 40 %
CPU load Filemaker: around 25 %
Running as a saved application:
Time to complete: 5503 sek <<<---- !!!!
CPU load Script App: starting at 4% droping to 0.5%
CPU load Filemaker: starting at 15% droping to 2%
Stuff involved:
OS 10.3.8 (classic not running)
Filemaker 6.04
Script Debugger 3.08
XML Tools 2.1
XML lib 2.0
I first wrote it using XML Tools from late night software. I suspected
it to be the culprit so I rewrote the script to use the much faster
XML lib from SatImage. While this does speed things up, both versions
show the same performance drop when saved as an application.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
sweater.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden