JavaScript isn't multithreaded, even if you start something with a
timer. But you can have widget.system() spawn a separate thread by
providing a function that will be called when it finishes. This is
described here:
When my widget makes its call to widget.system("/usr/bin/
osascript...") to get some information from external applications,
it freezes the widget for about half a second. Any ideas what the
cause is? It's difficult to believe AppleScript could be this slow
when it's only getting a few lines of text as a response. True, it
is launching an entire separate process (osascript), though I don't
think that is supposed to be so expensive.
What ways are there to optimize it? It's already running in a
separate timing thread. Anyone have insights into the
multithreading architecture of JavaScript in Safari?
Brian
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Dashboard-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/dashboard-dev/kazezb%
40carleton.edu
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Dashboard-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/dashboard-dev/email@hidden