Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Decreased 'do shell script' iterative performance under 10.4.x



Hello all,

I've noticed that with the release of 10.4.x that the performance of iterative 'do shell script' commands is noticeably decreased compared to performance under the later 10.3.x releases. I've built a 'speed test' application to document this issue that loops through 2500 counts of the shell script 'whoami' and then displays the time that the loop took. The code was compiled with XCode 2.1's 'release' flag set. Replacing the 'whoami' command with various other shell commands yields similar results.

I ran the speed test application on two 'vanilla' OS X installs on the same computer, one under 10.4.2 and the other under 10.3.9. 10 tests were performed per launch, and the time averaged for each set of runs. Spotlight wasn't indexing at the time of the 10.4.2 test, and both user accounts were freshly generated and no other foreground processes (besides the Finder) were running. CPU usage was nominal under both OSes before initiation of the test procedures

The results are as follows:
    10.3.9 - 74.90 second average for 10 runs
    10.4.2 - 85.80 second average for 10 runs

The 10.4.2 times were almost 15% slower than the time the exact same code took to execute under 10.3.9. Are any other folks seeing slower iterative execution of 'do shell script' commands under 10.4.x installs? After fighting so hard for years to squeeze increased performance from my AppleScript Studio application, it's disheartening to lose performance to this issue as folks upgrade to 10.4.

Best,

Steve Elliott
Babel Company

P.S. - The code I used to conduct these tests lists as follows:

on clicked
    set t to (time of (current date))
    repeat with i from 1 to 2500
        try
            do shell script "whoami"
        on error
            exit repeat
        end try
    end repeat
    log (((time of (current date)) - t) as string) & " seconds"
end clicked
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-studio mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-studio/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.