• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: get properties treating variable as literal
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: get properties treating variable as literal


  • Subject: Re: get properties treating variable as literal
  • From: Philip Aker <email@hidden>
  • Date: Wed, 04 Oct 2006 22:00:02 -0700

On 2006-10-04, at 16:51:18, Emmanuel wrote:

OMPBG4, XMLLib is 6+ times faster in this exercise (3.5 ms vs 24 ms.)

Just for comparison, in case anyone is interested, I ran this:

script setest
tell application "System Events"
set p to (property list file (path of file "com.apple.dashboard.plist" of preferences folder))
value of property list item "locale" of p
end tell
end script
run script setest

in Terminal as:

# time osascript setest.scpt

with results:

en_US

real    0m0.302s
user    0m0.114s
sys     0m0.033s


And then I ran this:

script xmll
set f to ("" & (path to preferences folder) & "com.apple.dashboard.plist")
set p to PlistOpen file f
PlistGetKeys p
PlistGet p key "locale"
end script
run script xmll

with results:

en_US

real    0m0.347s
user    0m0.122s
sys     0m0.040s


I believe osascript is a fairer test because it creates a new component instance and properly calls CloseComponent() for each invocation. Therefore the load costs are factored in. Or as Aretha Franklin might have said: "Who's zoomin' who?".


Philip Aker
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

References: 
 >get properties treating variable as literal (From: Jaime Magiera <email@hidden>)
 >Re: get properties treating variable as literal (From: Christopher Nebel <email@hidden>)
 >Re: get properties treating variable as literal (From: Jaime Magiera <email@hidden>)
 >Re: get properties treating variable as literal (From: Christopher Nebel <email@hidden>)
 >Re: get properties treating variable as literal (From: Emmanuel <email@hidden>)

  • Prev by Date: Re: get properties treating variable as literal - lightbulb moment
  • Next by Date: Re: Can't turn off screen savers in System Preferences
  • Previous by thread: Re: get properties treating variable as literal
  • Next by thread: Re: get properties treating variable as literal
  • Index(es):
    • Date
    • Thread