Re: AppleScript's script size limit
Re: AppleScript's script size limit
- Subject: Re: AppleScript's script size limit
- From: christian vick <email@hidden>
- Date: Thu, 31 Oct 2002 14:58:07 +0100
on 10/22/02 7:49 PM, Paul Berkowitz at email@hidden wrote:
>
On 10/21/02 1:04 PM, "Emmanuel" <email@hidden> wrote:
>
>
> At 11:28 AM -0700 20/10/02, Paul Berkowitz wrote:
>
>>
>
>> AppleScript cannot compile scripts larger than about 140K source text, I say
>
>> "about" because it seems to vary a little depending on the "parts of speech"
>
>> - the syntax.
>
>> Not the AppleScript formatting - removing ALL formatting and
>
>> having every single syntax element as Geneva 10 plain text made no
>
>> difference whatsoever , unlike a much higher limit i once discovered back in
>
>> AS 1.3.7 (OS 8.6) and unlike a much lower limit related to style runs with
>
>> the AppleScript Debugger language.
>
>
>
> Very interesting input. Thanks much for your tests, Paul.
>
>
>
> My O.O2 euros about that point: a French professional who kindly
>
> reported his tests to me said Smile passed a 400 KB (we are talking
>
> about number of characters of the source text) test, but failed to
>
> compile a 488 KB script. (OS 10.1.2, AS 1.9, Smile 2.4.6).
>
>
>
>> But it seems to me that the limit I once hit in AS 1.3.7 was much higher
>
>> than that. Is the AppleScript team even aware of this 140K limit, or do they
>
>> do all their testing in Script Editor? Is this limit something essential,
>
>> built in, or could it be expanded?
>
>
>
> I would say, do they do any testing at all? :-)
>
>
>
> Just kidding, Steve.
>
>
>
> In my opinion, we are probably facing a minor bug of AppleScript. I'd
>
> bet that they could have it fixed within 15 minutes.
>
>
>
>
Thanks, Emmanuel.
>
>
Bill Fancher has reported to me that he was able to compile a 1.1 MB script!
>
So there's something other than length involved.
>
>
I tried:
>
>
1) Replacing explicit run handler by implicit (top-level).
>
>
2) Moving implicit run handler (top-level script) to bottom of script.
>
>
3) Removing my top-level script object.
>
>
4) Removing all references to a 3rd-party osax (24U Appearance OSAX).
>
>
So far, none of those has helped.
>
>
>
Other things I'll try:
>
>
1) Removing script objects inside handlers (there are 10).
>
>
2) Reducing number of handlers (close to 80), while keeping length the same.
>
>
My 140 KB limit for this particular script applies in Smile too, as well as
>
SD.
I'm just running into the same issue! I have a script which compiles with
162 KB but not with 168 KB (error -108).
I tried in Studio, same result. So it seems indeed an AS-thing. Heeeeelp!
It seems there is a relation to the number of handlers in the script (my has
about 80).
A test script with 770 handlers compiles, 780 errors.
Another script with the same (or a lot more) character count, but without
handlers doesn't error:
--makeManySmallHandlers()
makeLargeScriptText()
on makeManySmallHandlers()
set theText to ""
repeat with i from 1 to 770 -- 780 errors = 102 KB
set theText to theText & "
handler" & i & "(\"Weischwurscht\", \"$ " & i & ",99\")" & "
on handler" & i & "(param1, param2)
activate
display dialog param1 & \": \" & param2
end"
--length of theText
end repeat
return theText
end makeManySmallHandlers
on makeLargeScriptText()
set theText to ""
repeat with i from 1 to 2000 -- =227 KB doesn't error, didn't try more
set theText to theText & "
activate
display dialog \"Weischwurscht Weischwurscht
Weischwurscht Weischwurscht
Weischwurscht Weischwurscht 1234\"
"
--length of theText
end repeat
return theText
end makeLargeScriptText
OS 10.2.1
AS 1.9
Script Debugger 3.0.5
Greetings
Christian Vick
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.