[Pythonmac-SIG] appscript terminology caching
Bob Ippolito
bob at redivi.com
Fri Oct 15 22:56:04 CEST 2004
On Oct 15, 2004, at 4:01 PM, has wrote:
> Jack wrote:
>
>> I was thinking here of getting cached terminology from different
>> places. For example, think of an option in py2app, where it would
>> optionally precompile all the terminology needed and stuff it into
>> the application bundle.
>
> Terminology resources belong to installed applications, not client
> scripts, so it wouldn't make sense to bundle it with the latter. (i.e.
> It's specific to a machine, not to a script.)
I'm not sure I agree with this. I'm pretty sure that compiled
applescripts do not depend on the terminology of the applications they
talk to, and I would imagine that the vast majority of applications
written in compiled languages that use AppleScript to talk to one
another do not parse terminologies before they start talking.
>> But I guess this could just as easily be handled by the caching
>> engine searching multiple (configurable) places,
>
> site-packages/appscript_cache would be one option.
> /Library/Caches/appscript and/or(?) ~/Library/Caches/appscript would
> be another. There may be others. Not sure where would be best. Not
> sure if it needs to be user configurable or not. (Think of use-cases?)
> Not sure about write permissions. Any thoughts?
I don't think transparent caching should happen at all. Caching should
be entirely explicit, there's just too many problems (having multiple
versions of an application installed, write permissions on cache, cache
getting out of sync with applications, client scripts written for
version X of an application running on another machine that has a
version Y terminology cached, etc.) and not enough benefits (faster
startup for "free").
In other words, if implicit caching of AppleScript terminologies made
sense, Script Editor would do it. It doesn't.
-bob
More information about the Pythonmac-SIG
mailing list