• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Buffered-Unbuffered data in AS?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Buffered-Unbuffered data in AS?


  • Subject: Re: Buffered-Unbuffered data in AS?
  • From: has <email@hidden>
  • Date: Mon, 1 Jul 2002 13:54:59 +0100

Emmanuel wrote:

>At 7:11 PM +0200 29/6/02, Philippe GRUCHET wrote:
>
>>Before writing a parser, I'd like to know if there's a size limit
>>to buffer data in AppleScript?
>
>No limit that I know.

I think memory consumption would be the only practical concern, no?

Whether there's any other performance benefits/losses to be had from
loading the full string vs. loading in chunks I don't know. Also, there's a
file reading library by Victor Yee on AppleMods (over at macscripter.net)
that does buffered file reads, if you're interested.

Out of interest, btw, what sort of parser? Designing parsers - especially
efficient ones - in AS can be an interesting exercise (it's not exactly
world-famous for its text munging facilities). Tab-delimited files are
easy; HTML/XML is rather less so. Character-by-character reading will be
dreadfully slow except for short strings; a smarter approach using TIDs may
be preferable.If it's an XML parser you need, you might want to take a look
at the XML Tools osax. (If you want to parse XML into a DOM, you might even
try writing an OO wrapper for XML Tools, rather than design your own parser
in AS from the ground up.)

HTH

has

--
http://www.barple.connectfree.co.uk/ -- The Little Page of Beta AppleScripts
_______________________________________________
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.

  • Prev by Date: Re: BUG: More on C-header text files - CORRECTION
  • Next by Date: insert a literal quote
  • Previous by thread: Re: BUG: More on C-header text files - CORRECTION
  • Next by thread: Re: Buffered-Unbuffered data in AS?
  • Index(es):
    • Date
    • Thread