Re: Checking on the existence of a file
Re: Checking on the existence of a file
- Subject: Re: Checking on the existence of a file
- From: Emmanuel LEVY <email@hidden>
- Date: Wed, 05 Dec 2012 19:01:11 +0100
Not sure whether it's a memory leakage affair, or a symbol table overflow.
Best,
Emmanuel
On Dec 4, 2012, at 11:41 PM, Shane Stanley wrote:
> On 05/12/2012, at 1:59 AM, Harald E Brandt <email@hidden> wrote:
>
>> Ahaa! I had the feeling it was somehow accessing a property or instance variable when I omitted the parentheses -- when I timed them the version without parentheses actually ran a couple of microseconds faster, to my surprise. (But actually executing 'valueForKey_("isAbsolutePath")' or 'valueForKey_("absolutePath")' is a bit slower than 'isAbsolutePath()').
>
> I was hoping I'd prompt you to do the timings :-), but they cast doubts on my hypothesis about KVC.
>
>> If I time the different variants in my timer with a 1000-iteration loop, the version with parentheses (isAbsolutePath()) will run at a steady 45 microseconds per iteration, the KVO method (valueForKey_("isAbsolutePath")) will run at a steady 65 microseconds, whereas the version without parentheses (isAbsolutePath) will start off at only 35 microseconds per iteration, but each time I run the loop the time will increase, and after a few runs AppleScriptObjC Explorer 2 will choke and fail with "*** -[ASRunner newPerformer:]: Internal table overflow. (error -2707)". And any new attempt to run will give me "Error compiling script". It must be restarted.
>
> That looks like a pretty standard AppleScript crash it's prompting. Not good, and casts further doubt on my theory.
>
>> (But I could still wish for a bit more consistency in ASObjC, more like the consistency of pure ObjC. And of course, no memory leakage!)
>
> Dreamer ;-)
>
>
> --
> Shane Stanley <email@hidden>
> 'AppleScriptObjC Explored' <www.macosxautomation.com/applescript/apps/>
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/archives/applescript-users
>
> 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:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden