Re: Buffered-Unbuffered data in AS?
Re: Buffered-Unbuffered data in AS?
- Subject: Re: Buffered-Unbuffered data in AS?
- From: Chris Espinosa <email@hidden>
- Date: Tue, 2 Jul 2002 16:26:55 -0700
On Tuesday, July 2, 2002, at 12:15 PM, Philippe GRUCHET wrote:
>
Right!
>
I've just found a size limit: lower than 20K from an external data
>
fork.
>
From 20K, AS doesn't handle buffered data correctly.
>
And from inside the Script Editor (events window), we can see that
>
data are not loaded at all!
>
>
So, from 20K and more, data must be cut into segments.
Could you verify that you're not just running into the Script Editor's
limitation on displaying data in the event log and results window? Our
internal testing shows that AppleScript is able to read much larger
files -- the following test worked up to 16Mb but failed (woth an
out-of-memory error) at 32Mb:
set theString to " 123456789ABCDEF"
repeat 6 times
set theString to theString & theString
end repeat
-- theString is now 1K characters or one block
set f to open for access file "Macintosh HD:foo.txt" with write
permission
repeat 8192 times -- change this number
write theString to f
end repeat -- f now contains 8Mb of data
close access f
set f to open for access file "Macintosh HD:foo.txt"
set s to read f
close access f
length of s -- should be 8388608
Chris Espinosa
Apple
_______________________________________________
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.